Deploy · Node.js

Node.js hosting for APIs and servers.

Runex hosts Node.js apps (Express, Fastify, NestJS, or plain http) as long-running servers deployed from GitHub. Runex runs npm start in an isolated container and serves it over HTTPS.

  • Express, Fastify, NestJS
  • npm, pnpm, or yarn
  • Autoscaling replicas
acme/api
runtime
Node.js 22
install
npm ci
start
npm start
listen
0.0.0.0:$PORT
url
https://api.runex.cloud
illustrative namesrunex

Definition

What is Node.js hosting?

Running your Node.js server continuously on the internet, with a public URL. Runex keeps the process running and adds instances with autoscaling when traffic grows.

Node.js is a JavaScript runtime for servers. A Node.js app usually starts an HTTP server (with Express, Fastify, or NestJS) that listens on a port.

Hosting it means installing dependencies, starting the process, restarting it if it crashes, and putting HTTPS in front. Runex does all four.

Your server runs in its own container with CPU and memory limits, and Runex can add replicas when traffic rises.

How to deploy

How do you deploy a Node.js app on Runex?

A start script and a port. That's the setup.

  1. You

    Add a start script

    "start": "node server.js" in package.json.

  2. You

    Read PORT

    Listen on process.env.PORT and 0.0.0.0.

  3. You

    Connect the repo

    Install the Runex GitHub App and pick the branch.

  4. Runex

    Install and start

    Runs npm ci, then npm start.

Configuration

How should a Node.js server listen on Runex?

On 0.0.0.0 and the port in PORT, with a health route. The port configuration guide shows the same fix for other languages.

server.js
const express = require("express");
const app = express();

app.get("/health", (req, res) => res.send("ok"));
app.get("/", (req, res) => res.json({ hello: "runex" }));

const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0");   # not localhost
server.jsrunex

Avoid

What are common Node.js deploy mistakes?

Most are about ports and dependencies. Keep secrets in environment variables, not in the repo.

  • Listening on localhost, which is unreachable from outside the container
  • A hard-coded port instead of process.env.PORT
  • Build tools in devDependencies that production needs
  • Storing uploads or sessions on local disk, which replicas don't share

FAQ

Node.js deploy questions

Short answers for your first deploy.

Which Node.js frameworks work on Runex?

Any framework that starts an HTTP server, including Express, Fastify, NestJS, Koa, and Hapi. Runex runs your npm start script.

Can I use pnpm or yarn on Runex?

Yes. Commit the lockfile for your package manager so the build installs exactly the versions you tested.

How do I set the Node.js version?

Add an engines field to package.json, such as "node": ">=20". For an exact version, use a Dockerfile with the Node image you want.

Why does my Node.js app work locally but not on Runex?

Usually it listens on localhost or a fixed port. Listen on 0.0.0.0 and process.env.PORT so Runex can route traffic to it.

Next step

Deploy your Node.js server.

Connect your repo and get a live HTTPS URL on your first deploy. Free to start.