Skip to content
Development and deployment2 min read

What is Node.js?

Short answer

Node.js is a runtime that executes JavaScript on the server, built on the V8 engine from Google Chrome. It uses a non-blocking, event-driven model, which makes it a good fit for APIs, real-time apps and bots that handle many connections at once.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. How Node.js works
  2. Example: a minimal server
  3. Common problems
  4. On ArabyHost

Ryan Dahl released Node.js in 2009, letting front-end developers write the server in the same language they already knew. A large share of modern web tooling now depends on it, even when the finished site is static.

How Node.js works

Your JavaScript runs on a single thread, but input and output (reading files, network calls, database queries) don’t block it. Node.js starts the operation and moves on; when the result is ready, the event loop queues the matching callback. That’s how it holds thousands of concurrent connections with little memory, and also why one heavy CPU-bound calculation can stall the whole app.

The key difference from PHP: a Node.js app is a long-running process listening on a port, whereas PHP starts and finishes with each request.

Example: a minimal server

const http = require('http');
const port = process.env.PORT || 3000;

http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
  res.end('Hello from Node.js');
}).listen(port);

Reading the port from process.env.PORT instead of hard-coding it lets the app run behind the host’s application server. Packages are managed with npm and package.json.

Common problems

Error Usual cause
EADDRINUSE The port is already taken by another copy of the app
Cannot find module Dependencies weren’t installed, or a filename’s letter case differs
heap out of memory A build or the app ran past the available memory

Fixes are on the EADDRINUSE and module not found pages.

On ArabyHost

Node.js apps run on AI/Developer plans with Node.js 20 and 24, through cPanel’s Setup Node.js App (the CloudLinux selector that runs your app with Phusion Passenger) plus SSH jailed in CageFS. Background tasks such as bots run as separate processes kept alive by a cron job. There’s no Docker and no root access. Prebuilt React or Vue sites are just static files, so they can go on any plan. More on Node.js hosting, and the steps are in the Node.js deployment guide.

FAQ

Is Node.js a programming language?

No. The language is JavaScript; Node.js is the environment that runs it outside the browser and adds access to files and the network. Express and Next.js are frameworks that run on top of Node.js.

Which Node.js version should I use?

Pick an LTS line, the even-numbered releases such as 20 and 24, because they get longer support. Match the server's version to the one you developed and tested on.

Can Node.js run on shared hosting?

It depends on the plan. A Node.js app needs a process that keeps running, so the host must support Node.js applications, as ArabyHost's AI/Developer plans do.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.