Quick Start — Node.js¶
Deploy a Node.js app from git push to a live HTTPS URL in 5 minutes.
Prerequisites¶
- A Node.js project (
package.json+ astartscript) - Node.js 20+ on your machine (
node --version) - The
paasCLI:
If you don't already have a Node.js project, scaffold one:
mkdir hello-paas && cd hello-paas
npm init -y
cat > server.js <<'EOF'
const http = require('http');
const port = process.env.PORT || 3000;
http.createServer((_, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello from PaaS Runtime!\n');
}).listen(port, () => console.log(`listening on :${port}`));
EOF
npm pkg set scripts.start="node server.js"
git init && git add -A && git commit -m "init"
Step 1 — Authenticate¶
This opens your browser for SSO (Keycloak). Once authenticated, the token is stored in ~/.config/paas/credentials.toml.
Verify:
Step 2 — Create the app¶
Output:
✓ Created app hello-paas
URL: https://hello-paas.runtime.di2amp.com
Region: eu-fr-1
Plan: free
Git: https://git.di2amp.com/octave/hello-paas.git
The paas apps create command:
- Provisions a Kubernetes namespace (
paas-apps, labelpaas-tenant-id=...) - Creates a Forgejo repo under your org
- Adds it as a
paasgit remote in your local repo
Verify:
$ git remote -v
paas https://git.di2amp.com/octave/hello-paas.git (fetch)
paas https://git.di2amp.com/octave/hello-paas.git (push)
Step 3 — Add a Procfile¶
PaaS uses Buildpacks (Paketo) to build images automatically. You only need a Procfile to declare process types:
Commit it:
Step 4 — Push to deploy¶
You'll see live build logs:
remote: ─────── PaaS Build ───────
remote: → Detected: nodejs (paketo-buildpacks/nodejs)
remote: → Installing Node.js 20.10.0
remote: → Running: npm ci --omit=dev
remote: → Running: npm rebuild
remote: → Image: registry.di2amp.com/octave/hello-paas:abc1234
remote: → SBOM: ✓ generated, 47 packages
remote: → CVE scan: ✓ 0 critical, 0 high
remote:
remote: ─────── PaaS Deploy ───────
remote: → Process types: web
remote: → Replicas: 1/1 ready
remote: → Rollout: v1 → v2 (canary 10% → 100%)
remote: → Health: / returns 200 OK
remote: → URL: https://hello-paas.runtime.di2amp.com
remote:
remote: ✓ Deployed in 47s
Step 5 — Verify the app is live¶
The dashboard shows runtime status:
https://ma30.di2amp.com/runtime/dashboard/apps/hello-paas
Next steps¶
Add a managed PostgreSQL¶
The connection string is exposed automatically as DATABASE_URL:
const { Pool } = require('pg');
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
Tail logs¶
Add a custom domain¶
PaaS automatically issues a Let's Encrypt certificate via cert-manager.