Files
pulse-libs/skills/xcloud-docker-deploy/references/xcloud-native-nodejs.md
T
Pulse 22d9f5b21d feat: skill expansion — browser, security, SQL, files (16 skills total)
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
2026-05-19 20:51:05 -03:00

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 |