What is Node.js?

Node.js is a server-side JavaScript runtime. On TurboStack it runs your app as a process behind the Nginx reverse proxy.

Node.js is a server-side runtime that executes JavaScript outside the browser. It is built around an event-driven, non-blocking I/O model, which makes it well suited to network applications such as APIs, real-time services, and modern commerce platforms.

On a hosting platform, a Node.js application runs as a long-lived process that listens on a local port. A web server accepts public HTTPS traffic and forwards requests to that port. Your application code does not handle Transport Layer Security (TLS) or public networking directly.

On TurboStack

TurboStack runs Node.js as a per-application runtime. You enable it on an application and pick the major version you want, for example version 24 (or newer). Multiple applications on the same host can run different Node.js versions side by side.

Node.js applications are not exposed to the internet directly. Instead, your app listens on a local port and Nginx acts as a reverse proxy in front of it, terminating TLS and forwarding traffic to your process. This is the same pattern used to run platforms such as Medusa. The Node.js service runs as its own process and Nginx proxies requests to the port it listens on.

Because there is no dedicated app_type for generic Node.js apps, you combine the Node.js runtime with the reverse proxy to publish your application.

Best practices

  • Pin a specific major Node.js version so deployments stay reproducible, and plan upgrades when a version approaches end of life.
  • Run your app under a process manager - on TurboStack that is pm2 (a systemd service is the alternative) - so it restarts on crash and on reboot. See Keep a Node.js app running.
  • Have your app listen on a local port only and let Nginx handle public TLS traffic.
  • Keep dependencies up to date and audit them regularly for security advisories.
  • Use environment variables for secrets and configuration rather than committing them to your repository.