nodejs-template Node.js · Express

Mindfree Automated Delivery System

Deployment live — this environment was deployed automatically on push.
Project
smartonlineoffer-api
Branch
main
Commit
47064bd
Status
● Live

Database

✓ Database connected — showing last deploy_log records.
#ProjectBranchCommitDeployed at (UTC)
2smartonlineoffer-apimain47064bd2026-07-10 12:56:32
1smartonlineoffer-apimainf913cb62026-07-06 14:09:17

How to use this template

1
Create a new repo from this template

On GitHub, click "Use this template""Create a new repository". Set the owner to Mindfree-2 and make the repo private — the self-hosted runner only works on private repositories.

2
Push to deploy

Every push to any branch triggers the CI/CD pipeline automatically within ~2 minutes. Each branch gets its own isolated URL:

  • main{project}.mindfree.info
  • staging{project}.staging.mindfree.info
  • any other branch → {branch}.{project}.dev.mindfree.info
3
Write your code

Add routes in src/routes/index.js. For larger apps, split into multiple router files and mount them in src/app.js.

4
Add secrets & environment variables

Place files in /opt/mindfree/secrets/{project}/ on the server. Secrets are injected at deploy time and available via process.env.

Available Endpoints

RouteDescription
GET /This welcome page — replace with your application’s home
GET /healthHealth check — returns ok
GET /test-secretVerify secrets injection — expects TEST_SECRET in default.env
GET /test-storageVerify /data persistence across redeploys

Project Structure

nodejs-template/
├── src/
│   ├── server.js         ← entry point, Unix socket binding
│   ├── app.js            ← Express setup, middleware, routes
│   ├── db.js             ← PostgreSQL pool (add your queries here)
│   └── routes/
│       └── index.js      ← add your routes here
├── package.json          ← Node.js dependencies
└── Dockerfile            ← container build