Framework
Node.js
Any Node.js server — Express, Fastify, Koa, or the built-in http module.
3000Requirements
package.json with a "start" script
DropDeploy runs npm start to launch your server.
App must listen on port 3000
Hard-code 3000 or read process.env.PORT.
Demo app
A minimal app that is ready to push and deploy. Copy the files below into a new repository, commit, and deploy — it should go live without any changes.
{
"name": "my-node-app",
"version": "1.0.0",
"scripts": {
"start": "node index.js"
}
}const http = require('http');
const PORT = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(`
<html>
<body style="font-family:system-ui;display:flex;justify-content:center;
align-items:center;min-height:100vh;margin:0;background:#0f172a;color:#f1f5f9">
<div style="text-align:center">
<h1 style="color:#3b82f6">Hello from DropDeploy!</h1>
<p style="color:#94a3b8">Node.js server running on port ${PORT}</p>
</div>
</body>
</html>
`);
});
server.listen(PORT, '0.0.0.0', () => {
console.log(`Server running on http://0.0.0.0:${PORT}`);
});Build & start commands
DropDeploy runs these steps inside the container when you click Deploy.
npm install --omit=dev npm start
Environment variables
Set these in Project → Env Vars in the dashboard. Never commit secrets.
| Variable | Required | Description |
|---|---|---|
| PORT | No | Defaults to 3000. Keep it at 3000 to match the Dockerfile. |
| NODE_ENV | No | Set to production for prod-optimised behaviour. |
Common issues
Missing "start" script
Add "start": "node index.js" to the scripts block in package.json.
App binds to 127.0.0.1
Call server.listen(3000, "0.0.0.0"). Binding to localhost rejects connections from outside the container.
devDependencies at runtime
DropDeploy runs npm install --omit=dev. Move any runtime-required package from devDependencies to dependencies.