Node.js application hosting
Deploy an Express API or an existing Node.js backend. Configure the start command and environment variables, inspect logs, and check a preview release before moving traffic to it.
Last updated: 2026-10-26
From source code to a running service
Install dependencies during the build. Generate and commit package-lock.json, then use npm ci for repeatable installs. Set PORT=8080 and the application route port to 8080. Start with npm start.
Deployment steps
Prepare the project
Add the example files or use your existing project. Install dependencies and check the start command locally before deploying.
Configure the application
Create an application in your workspace. Choose the source, start command, environment variables and resource allocation. Web services need a route port; polling bots can remain private.
Check the release
Deploy and inspect build and runtime logs. Test web routes on the preview URL. For a polling bot, send /start in Telegram and ensure another process is not using the token.
Publish and monitor
Promote a verified web release to production. Keep database migrations separate from application rollback. Monitor errors and resource use after the update.
A minimal project
These examples show application code and startup, not a preconfigured infrastructure template. Test and lock your dependencies before using them in production.
{ "name": "inquir-express-example", "private": true, "type": "module", "scripts": { "start": "node server.js" }, "dependencies": { "express": "^5.1.0" } }
import express from "express"; const app = express(); const port = Number(process.env.PORT || 8080); app.get("/health", (_req, res) => res.json({ ok: true })); app.get("/", (_req, res) => res.json({ message: "Hello from Node.js" })); const server = app.listen(port, "0.0.0.0"); process.on("SIGTERM", () => server.close());
npm start
Separate the build from startup
Plain JavaScript can start directly. TypeScript and NestJS projects usually need a build step followed by a command that runs the compiled output. Install build-time dependencies before compiling; do not start a development watcher in production.
Keep state outside the process
In-memory sessions and local files are not automatically shared between replicas. Use a database or shared session store where appropriate. Mount a persistent volume for files that must remain after container replacement.
FAQ
Can I deploy NestJS or Fastify?
They can run as Node.js server applications. Configure each project’s dependencies, build command and start command, and bind its server to 0.0.0.0 on the configured port. The runnable example on this page uses Express.
Where should API keys go?
Use application environment variables and read them through process.env. Do not bundle server secrets into browser code. If a key has been committed to Git, remove it from the code and rotate it with its provider.
Why is the application unreachable?
Check that npm start stays running, that the process listens on 0.0.0.0, and that PORT matches the configured application port. Then inspect the release status and runtime logs before changing DNS.
How much does hosting cost?
Check the current plans and available payment offers in Plan & billing. Size the application and its dependencies against the shared resource pool. Preview replicas and databases also consume resources; an idle application is not automatically free.