22d9f5b21d
Novas skills instaladas: - openclaw-agent-browser v1.0.0 CLI Chromium — navegação, login, screenshots, state - skill-security-audit v1.0.0 SAST scanning, prompt injection, secrets audit - sql-toolkit v1.0.0 PostgreSQL/MySQL/SQLite — schema, query, otimização - file v1.0.0 Organização de arquivos por contexto - file-summary v1.0.0 Extração e resumo de PDFs, Word, Excel Workspace expandido: - TOOLS.md: +Browser automation, Security audit, SQL, File management - AGENTS.md: +Linux Analyst section (comandos, logs, rede, scripts) + Full-stack strategy - MEMORY.md: 16 skills indexadas, stack map, comandos Linux ref - SESSION-STATE.md: atualizado com contexto completo - lock.json: sincronizado com 16 skills instaladas
49 lines
1.0 KiB
Markdown
49 lines
1.0 KiB
Markdown
# xCloud Native Node.js Deployment
|
|
|
|
## Repository Setup (Required)
|
|
|
|
package.json must have a `start` script:
|
|
```json
|
|
{
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"build": "tsc -p tsconfig.json"
|
|
}
|
|
}
|
|
```
|
|
|
|
Port must use process.env.PORT:
|
|
```javascript
|
|
const port = process.env.PORT || 3000;
|
|
app.listen(port, () => console.log(`Server running on port ${port}`));
|
|
```
|
|
|
|
xCloud injects PORT automatically. Your app MUST listen on this port.
|
|
|
|
.env.example:
|
|
```env
|
|
NODE_ENV=production
|
|
PORT=3000
|
|
DATABASE_URL=
|
|
JWT_SECRET=
|
|
```
|
|
|
|
## xCloud UI Steps
|
|
|
|
1. Server → New Site → Node.js tab
|
|
2. Connect Git repo
|
|
3. Set branch
|
|
4. Node.js version: 18, 20, or 22
|
|
5. Start command: `npm start` (or `node server.js`)
|
|
6. Build command (if TypeScript): `npm run build`
|
|
7. Add environment variables
|
|
8. Click Deploy
|
|
|
|
## Common Issues
|
|
|
|
| Issue | Fix |
|
|
|---|---|
|
|
| App crashes on start | Check PORT env var is used (not hardcoded) |
|
|
| Module not found | Ensure node_modules is in .gitignore |
|
|
| TypeScript errors | Add build script, set build command in xCloud |
|