Deploy a Node.js server (Express, Fastify, NestJS)
An Express, Fastify, NestJS, Koa or plain Node.js server runs on Eurobase as a container that scales to zero when nobody calls it. This guide deploys one from GitHub.
Deploy from a GitHub repo
- Create an account and connect GitHub from GitHub in the sidebar.
- In Projects, select New project and choose your repository.
- Eurobase detects a Node server and prefills the build command (your
buildscript) and start command (yourstartscript). Check both. - Set the port your server listens on (3000 unless you change it) and the health path (
/). - Select Save and Deploy.
Make your server ready
Listen on 0.0.0.0 and the PORT environment variable, and answer the health path quickly:
import express from 'express';
const app = express();
app.get('/', (req, res) => res.send('ok'));
app.listen(Number(process.env.PORT) || 3000, '0.0.0.0');Before you deploy
- Use npm or Yarn 1, with one lockfile. pnpm, Bun, Deno and Yarn 2 or later are refused before the build.
- Node.js 20, 22 or 24. The build runs with
NODE_ENV=productionand installs devDependencies. - A start command that runs a development server is flagged; use your production start.
- Dockerfiles aren't used. A single
web:line in aProcfilealways wins as the start command.
Running and limits
- A deployment goes live only after the health path answers with 2xx or 3xx; otherwise the previous one keeps serving.
- A response must start within 55 s. Streams and WebSockets stay open, but close after 60 s without data, so send keepalives.
- Your server's own output isn't shown in Logs yet; build, deployment and request logs are.
- More on Containers and static sites.