Migrations Migrating from Heroku, Render, Hatchbox or Cloud 66? We move your production app within 48 hours →
Node.js

Node.js

Deploy Node apps and front ends — Express, Next, Vite and more — with workers and build steps handled.

  • Start: npm start when package.json has a start script; the app must listen on $PORT and 0.0.0.0 (HOST, BIND_ADDRESS and similar documented variables are set for you).
  • Packager: npm, pnpm, yarn or bun, chosen from your lockfile.
  • Workers: an npm run worker script is offered as a worker.
  • Static front ends: use a static site instead — no server process needed.
  • Large front-end builds are fitted to the build server’s memory automatically (build methods).

Build step

Your package.json build script runs before start with no configuration from you — for Next.js, Nuxt, SvelteKit and similar server-rendered frameworks, that’s next build/nuxt build/vite build detected straight from your dependencies, and the server starts with the matching command for each (next start, node .output/server/index.mjs…). An app that only produces static output (Gatsby, Create React App, a plain Vite SPA) is served as a static build with no server process at all — see static sites to skip the server entirely instead of running one just to serve files.

Workers are a second process, not a second app

web and worker are the same image, started with a different script — one codebase and one build, several process types, each scaled on its own. An npm run worker script is offered automatically; declare any others yourself:

web: npm start
worker: npm run worker

or add one from the app’s Workers tab without a repo change, and scale either from the CLI:

railyard scale my-app worker=2

Node has no single queue convention, so a BullMQ or similar Redis-backed job runner just needs its own script — REDIS_URL is injected automatically once ioredis, bullmq or bull is a dependency. See Workers and scheduled jobs for cron.

Config and secrets

Everything process.env reads is a plain var: set it under Variables, or railyard env:set my-app KEY=VALUE from the CLI, and the same build runs unchanged from staging through production — dev/prod parity, not a different bundle per environment. Point at a database or Redis running as its own service on the canvas with ${{redis.RAILYARD_PRIVATE_URL}} — resolved per environment. See Variables and secrets.

Deploy it

  • From a repo: paste the Git URL, or pick it from the picker once GitHub is connected — Railyard reads package.json, fills in the start command, packager and any database your dependencies declare, and deploys on every push.
  • From the CLI: railyard create my-app https://github.com/me/my-app --addons postgres,redis, or railyard git:remote && git push railyard main from inside the repo.
  • One click: add the deploy button to your README, or publish to the template catalog so anyone can launch it with its addons and variables already filled in.
Found an issue or have a question?
Theme
Colors