100 lines
2.4 KiB
Markdown
100 lines
2.4 KiB
Markdown
# 🚀 INÍCIO RÁPIDO - DENTAL SERVER v2.0
|
|
|
|
## ✅ PROJETO COMPLETO E PRONTO
|
|
|
|
Todos os arquivos necessários foram criados e estão prontos para upload no VPS.
|
|
|
|
---
|
|
|
|
## 📦 ARQUIVOS CRIADOS
|
|
|
|
### **CORE (4 arquivos)**
|
|
- ✅ `server.js` - Servidor principal (Express + Socket.IO)
|
|
- ✅ `auth.js` - Autenticação JWT
|
|
- ✅ `database.js` - Conexão SQLite
|
|
- ✅ `image-processor.js` - Processamento de imagens
|
|
|
|
### **ROTAS (2 arquivos)**
|
|
- ✅ `routes/auth.js` - API de autenticação (login, verify, logout)
|
|
- ✅ `routes/images.js` - API de imagens (8 endpoints)
|
|
|
|
### **FRONTEND (4 arquivos)**
|
|
- ✅ `auth/login.html` - Página de login
|
|
- ✅ `public/index.html` - Interface web principal
|
|
- ✅ `public/style.css` - Estilos responsivos
|
|
- ✅ `public/app.js` - JavaScript da interface
|
|
|
|
### **CONFIGURAÇÃO (2 arquivos)**
|
|
- ✅ `package.json` - Dependências Node.js
|
|
- ✅ `migration-v2.sql` - Migration do banco
|
|
|
|
### **DOCUMENTAÇÃO (8 arquivos)**
|
|
- ✅ `README.md` - Visão geral
|
|
- ✅ `INSTALACAO-DENTAL-SERVER.md` - Manual completo
|
|
- ✅ `INSTRUCOES-RAPIDAS.txt` - Guia rápido
|
|
- ✅ `CHECKLIST-IMPLEMENTACAO.md` - Checklist
|
|
- ✅ `RESUMO-IMPLEMENTACAO.md` - Resumo executivo
|
|
- ✅ `ARQUIVOS-FINAIS.txt` - Lista de arquivos
|
|
- ✅ `COMO-USAR-ENV.txt` - Como criar .env
|
|
- ✅ `ENV-CONFIG.txt` - Modelo de .env
|
|
|
|
### **INSTALER (1 arquivo)**
|
|
- ✅ `installer/check-installation.js` - Verificação
|
|
|
|
**TOTAL: 21 arquivos**
|
|
|
|
---
|
|
|
|
## 🎯 INSTALAÇÃO NO VPS
|
|
|
|
### **Passo 1: Upload**
|
|
Faça upload de TODA a pasta `dental-server` para `/www/wwwroot/`
|
|
|
|
### **Passo 2: Criar .env**
|
|
```bash
|
|
cd /www/wwwroot/dental-server
|
|
nano .env
|
|
```
|
|
Cole o conteúdo de `ENV-CONFIG.txt` e ajuste os valores
|
|
|
|
### **Passo 3: Instalar Dependências**
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
### **Passo 4: Migration do Banco**
|
|
```bash
|
|
sqlite3 database.sqlite < migration-v2.sql
|
|
```
|
|
|
|
### **Passo 5: Iniciar PM2**
|
|
```bash
|
|
pm2 start server.js --name dental-server
|
|
pm2 save
|
|
```
|
|
|
|
### **Passo 6: Configurar Nginx**
|
|
Adicione proxy reverso (ver `INSTALACAO-DENTAL-SERVER.md`)
|
|
|
|
---
|
|
|
|
## 🎉 PRONTO!
|
|
|
|
O servidor vai:
|
|
1. ✅ Criar banco de dados automaticamente
|
|
2. ✅ Criar usuário admin (rcesar / Rc362514)
|
|
3. ✅ Iniciar na porta 3000
|
|
4. ✅ Conectar Socket.IO
|
|
5. ✅ Servir interface web
|
|
|
|
---
|
|
|
|
**Credenciais Iniciais:**
|
|
- **Usuário:** rcesar
|
|
- **Senha:** Rc362514
|
|
- **Email:** rcesar@rcesar.com
|
|
|
|
---
|
|
|
|
**Para mais detalhes:** Leia `INSTALACAO-DENTAL-SERVER.md`
|