What Is Node.js? A Plain-English Guide to When Your Website Needs It

By Seahawk November 15, 2026 5 min read

Node.js is a free, open-source program that runs JavaScript on a server or a laptop instead of inside a web browser. A website needs Node.js on its server only when part of the site is a JavaScript application that has to run for each visitor, such as a Next.js site that renders pages on the server, a custom API or a live chat feature. A WordPress site does not need it, and neither does a site made of plain HTML files.

The rest of this guide explains what Node.js does, how to tell whether your site depends on it, and what it changes about hosting.

What Node.js Is

JavaScript was created to run in browsers. Node.js takes V8, the JavaScript engine inside Google Chrome, and runs it outside the browser. The official introduction describes it as an open-source, cross-platform JavaScript runtime environment.

Three points clear up most of the confusion:

  • It is a runtime, not a language. The language is still JavaScript. Node.js is the program that executes it, much as PHP-FPM is the program that executes PHP files.
  • It is not a framework. Express, Fastify and Next.js are frameworks that run on top of Node.js.
  • It ships with npm. npm is the package manager that installs the libraries a project lists in its package.json file.

How a Node.js App Runs

This is the smallest possible Node.js web server, taken from the Node.js documentation:

const { createServer } = require('node:http');

const hostname = '127.0.0.1';
const port = 3000;

const server = createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

Save it as server.js and start it:

node server.js

Two things here matter to anyone who pays for hosting.

First, the program is the web server. With PHP, a web server such as Apache or Nginx is always running and hands each request to PHP. With Node.js, your own code listens on a port and has to stay running. If the process stops, the site is down until something starts it again.

Second, a Node.js app runs in a single process and does not create a new thread for every request. While it waits for a database or another service, it gets on with other requests. That suits apps with many connections open at once. It also means one slow, CPU-heavy task can hold up every other visitor.

Build Time or Run Time: The Question That Decides Your Hosting

Many sites use Node.js only while they are being built. A developer or a build server runs Node.js to compile the site, and the result is a folder of ordinary files. Other sites need Node.js running in production for every request. These are very different commitments.

Type of siteNode.js to build it?Node.js on the live server?
WordPress siteSometimes, to compile a theme or block pluginNo. WordPress runs on PHP
Static site (Astro, or a Next.js static export)YesNo. Any web server can serve the files
Next.js site with server renderingYesYes, or a platform that runs it for you
Custom API, dashboard or real-time appUsuallyYes

If your site is in the first two rows, Node.js is a tool your developer uses. Your hosting plan does not need to support it. A static version of a WordPress site falls into the same group.

How to Tell If Your Site Uses Node.js

You do not need to read code. Ask for these three things, or check them yourself.

  1. Look for a package.json file in the project. If there is none, Node.js is not involved.
  2. Read its scripts section. A build script alone suggests build-time use. A start script such as node server.js or next start means a process runs in production.
  3. Ask what gets deployed. If the answer is a folder of HTML, CSS and JavaScript files, there is no Node.js on the server. If the host runs a start command, there is.

To see whether Node.js is installed on a machine and which version it has, run:

node -v
npm -v

When a Website Actually Needs Node.js

  • Server-rendered JavaScript frameworks. Next.js, which requires Node.js 20.9 or later, runs as a Node.js server when it renders pages for each request. Our team builds these as part of Next.js development work.
  • A custom back end. An API for a mobile app, a customer portal or a booking engine written in JavaScript or TypeScript.
  • Real-time features. Chat, live notifications and collaborative editing keep a connection open to each visitor, which is the kind of work Node.js was designed for.
  • A headless front end. WordPress stays as the editor and a JavaScript front end renders the pages. Headless setups often add a Node.js server next to the PHP one.

When It Does Not

  • A standard WordPress or WooCommerce site. PHP and a database are all it needs.
  • A brochure site, blog or documentation site that can be generated as static files.
  • A site whose only JavaScript runs in the visitor's browser, such as sliders, forms and analytics tags.

If someone proposes moving a content site from WordPress to a Node.js stack, ask what problem that solves. Our comparison of Node.js and WordPress covers the trade-offs in more detail.

What Node.js Changes About Hosting

When a site does need Node.js at run time, four things change.

  • Something must keep the process alive. A process manager or the hosting platform restarts the app after a crash or a server reboot.
  • A web server usually sits in front. Nginx or a similar reverse proxy handles HTTPS and passes requests to the port your app listens on.
  • The Node.js version needs looking after. Each release line has an end-of-life date. As of November 2026, Node.js 26 is the Active LTS line, 24 and 22 are in maintenance, and Node.js 20 reached end of life on April 30, 2026. The Node.js releases page lists the current status.
  • Classic shared hosting may not fit. Plans built for PHP do not always let you run a long-lived process. A VPS, a platform service or a host with a Node.js selector is the usual answer.

Questions to Ask Before You Approve a Node.js Build

  1. Does the site need Node.js in production, or only to build it?
  2. Which Node.js version will it run, and when does that version reach end of life?
  3. What restarts the app if it crashes at 3 a.m.?
  4. Who applies Node.js and dependency security updates, and how often?
  5. If we change agency or host, can the app run anywhere that supports Node.js, or is it tied to one platform?

Clear answers to these five mean the project has been thought through. Vague answers are a reason to slow down. You can find more on this topic in our Node.js articles.

SeaPHP

Mission-critical PHP services and Next.js migrations.

Complex upgrades for PHP applications and websites. PHP-to-Next.js migrations for what comes next.