Quickstart
Quick Start — Node.js
Publish a working Node.js application on Zenifra using GitHub Repository source.
Prerequisites
- Node.js 18+ installed locally
- a GitHub account
- access to the Zenifra console
Note: This quickstart covers only projects with
GitHub Repositorysource.
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 before publishing the project.
Step 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, choose GitHub Repository as the project source.
- Select the repository and the
mainbranch. - In the runtime field, select
Node.js. - In the Port field, enter
3000. - In
build, use the command required by your project or leave it empty if there is no build. - In
start, usenpm start. - If you want automatic updates on push, enable
auto-deployduring creation. - 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.
If auto-deploy was enabled during creation, Zenifra will update the instance automatically 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 |
| Build failed | Review package.json, package-lock.json, and configured commands |