Quick Start — Node.js
Publish a working Node.js application on Zenifra using the Git repository source with the GitHub provider.
Prerequisites
- Node.js 20+ installed locally
- a GitHub account, with the Zenifra GitHub App installed and connected to the organization (see How to connect GitHub)
- access to the Zenifra console
Note: This quickstart uses GitHub. The same flow works for a Forgejo repository; see Deploy via Forgejo.
Step 1 — Create your application
mkdir hello-zenifra
cd hello-zenifra
npm init -y
npm install expressCreate index.js:
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.json({ message: 'Hello from Zenifra!', time: new Date().toISOString() });
});
app.get('/health', (req, res) => {
res.json({ status: 'ok' });
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => {
console.log(`Server running on port ${PORT}`);
});Update package.json with a start command:
{
"scripts": {
"start": "node index.js"
}
}Confirm that package-lock.json was generated and is synchronized with package.json before publishing the project. Commit both files to the application root directory.
Verify dependency installation with the same Node.js version that you will select on Zenifra:
npm ci
npm startStep 2 — Publish to GitHub
Create a repository on GitHub and push the code:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/hello-zenifra.git
git push -u origin mainStep 3 — Create the project on Zenifra
- In the console, set Project Source to Git repository and, under Git provider, select GitHub.
- Select the repository and the
mainbranch. - Under Runtime, select
Node.jsand choose the Version. - In the Port field, enter
3000. - In Build Command, use
npm run buildifpackage.jsonhas abuildscript; otherwise, leave the field empty. - In Start Command, use
npm start. - If you want automatic updates on push, select Automatic by branch under Deployment mode.
- Click Create Project.
Step 4 — Validate the deployment
Open the URL at *.clients.zenifra.com. You will see:
{ "message": "Hello from Zenifra!", "time": "2026-04-30T14:00:00.000Z" }Also test /health to confirm the application is ready.
With Automatic by branch selected, Zenifra deploys a new version on each push to main.
Troubleshooting
| Problem | Solution |
|---|---|
| The application does not start | Check whether the value configured in the Port field matches the port your application actually listens on |
| URL does not respond | Confirm the application listens on 0.0.0.0 |
Missing or invalid package-lock.json | Generate it with npm, commit it next to package.json, and verify with npm ci |
| Lockfile is out of sync | Run npm install, commit the updated package-lock.json, and run npm ci again |
| Project uses pnpm or Yarn | Review the current Node.js dependency requirements before adapting the project; pre-build runs only after the initial npm installation |
| Another build command failed | Review Build Logs and verify npm run build, when present, and npm start locally |
Next steps
Last updated on
Platform concepts
Understand organizations, projects, plans, payment models, instances, deployment sources, domains, and API keys before you start using Zenifra.
Quick Start — Python
Publish a FastAPI or Flask application on Zenifra from a GitHub repository, with a configured port and deployment validation.