58 lines
1.2 KiB
Markdown
58 lines
1.2 KiB
Markdown
# saas_app
|
|
|
|
Criar envlocal para usar variaveis de ambiente no em desenvolvimento
|
|
NEXT_PUBLIC_ORIUS_APP_STATE=GO
|
|
NEXT_PUBLIC_ORIUS_APP_API_URL=<http://localhost:8000/>
|
|
NEXT_PUBLIC_ORIUS_APP_API_PREFIX=api/v1/
|
|
NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE=application/json
|
|
|
|
## Modo Debug
|
|
|
|
Abra Run → Add Configuration… → Attach to Node.js
|
|
|
|
Configure:
|
|
|
|
{
|
|
"name": "Attach Next.js (9230)",
|
|
"type": "node",
|
|
"request": "attach",
|
|
"port": 9230,
|
|
"restart": true,
|
|
"smartStep": true,
|
|
"skipFiles": ["<node_internals>/**"]
|
|
}
|
|
|
|
npm run dev:debug
|
|
|
|
## onlyoffice
|
|
|
|
docker run -i -t -d -p 8081:80 --restart=always -e JWT_ENABLED=false onlyoffice/documentserver
|
|
|
|
## next em rede
|
|
|
|
```
|
|
npx next dev -H 0.0.0.0
|
|
```
|
|
|
|
```
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"dev:lan": "next dev -H 0.0.0.0" <-- Adicione esta linha
|
|
},
|
|
```
|
|
|
|
Como acessar no outro dispositivo
|
|
Descubra seu IP Local:
|
|
|
|
No Windows (seu caso), abra um terminal (CMD ou PowerShell) e digite:
|
|
|
|
Bash
|
|
|
|
ipconfig
|
|
Procure por Endereço IPv4 (geralmente começa com 192.168.x.x ou 10.0.x.x).
|
|
|
|
Acesse no navegador: No celular ou outro computador, digite: http://SEU_IP_AQUI:3000
|
|
|
|
Exemplo: <http://192.168.0.15:3000>
|