ENATIV Logo
ENATIV
Back
© 2026 ENATIV
ProjectsServicesKnowledge hubContact
contact@enativ.pl
  1. Knowledge hub
  2. ›
  3. Backend & APIs
  4. ›
  5. Node.js

Node.js

A JavaScript runtime outside the browser with an event loop, used for APIs and services: Node.js.

Backend & APIsUsing since 2016 · Featured project: Gaia Lens (in the Code & Pepper team)

Category
Backend & APIs
Using since
2016
Featured project
Gaia Lensin the Code & Pepper team

In practice

I pick Node.js when the backend should be written in the same language as the frontend and mostly wait for data: the database, the network, files. It is in the stack of Gaia Lens and Kuma.de. I never leave long calculations on the main thread.

What is Node.js?

Node.js is an open-source, cross-platform JavaScript runtime. It runs V8, the engine behind Chrome, outside the browser, so JavaScript can work on a server, in a script or in a command-line tool.

An app runs in a single process and does not create a new thread for every request. Reading from the network, a database or a disk is asynchronous: instead of waiting, Node.js comes back when the answer arrives. The main working rule follows from that: one long operation on the main loop holds up every other client.

Kind
A runtime environment, open source
Engine
V8, as in Chrome
Working model
Event loop with non-blocking I/O
Packages
npm, the standard manager

How I work with Node.js

I start by asking what the process is meant to do: wait on a database and the network, or calculate. The first kind of work suits Node.js, the second has to leave the main loop. I do not guess it: I check which requests take longest, and only then decide what to move off.

  1. Splitting the work

    Database queries, API calls and files stay in the main process. Calculations that take more than a moment go to a worker thread or a separate service, because a blocked loop cannot serve other clients.

  2. One language, one set of types

    I write the code in TypeScript and check outside data with a schema where it enters the app. That way one language and the same types cover the frontend and the backend, which is an advantage.

  3. The environment under control

    I fix the Node.js version in the project, because on a server I choose the environment and in a browser I do not. I package the app in Docker, so every deployment starts from the same set.

When it fits, and when it doesn't

Node.js fits where the backend mostly waits for data instead of calculating.

A good fit when

  • APIs and services that query a database and other systems and have little logic of their own.
  • A TypeScript app where the frontend and the backend share types and validation schemas.
  • Integrations that send and receive HTTP requests to outside services.
  • A Next.js site with a Payload CMS panel: both run on Node.js as the runtime.

Not a fit when

  • Heavy calculation, such as processing large files, that cannot be moved off the main loop.
  • A team that knows only another backend language and has no reason to change.
  • A simple static site that needs no server to run.

When the app is meant to calculate more than wait for data, I consider a backend language other than JavaScript.

Frequently asked questions

Node.js is open source and cross-platform, so it runs on your server, in a container or in a cloud and does not lock you into one host. You pay for hosting and the work on the app, not for the runtime. We settle where to run it together, and the code and data stay with you.
Node.js handles many parallel connections well, because it creates no thread per request and does not idle while waiting for a database. The bottleneck is long calculation on the main loop. So I check where the app calculates and where it waits, and move the heavy tasks off. I promise no user numbers.
Yes. Node.js lets you write the server in JavaScript, so one language covers the browser and the server, and TypeScript adds shared types. The backend does not have to be Node.js, though. If you already run a system in another language, I work against its API and move nothing by force.
Every package from the npm registry is code written by someone else, living in your project, and a risk of its own. So I choose libraries carefully, keep versions pinned in a lockfile and check what changed at each update. Fewer dependencies means less to watch.

On this page

  • In practice
  • What is Node.js?
  • How I work with Node.js
  • When it fits, and when it doesn't
  • Frequently asked questions

Related topics

  • Node.js
  • TypeScript
  • Next.js
  • PostgreSQL
  • GraphQL
  • tRPC
  • Docker

Related services

  • Web ApplicationsModern, fast and scalable web applications using React and Next.js.

A backend that mostly waits for data?

Describe what the app should do with its data and where the data comes from. I will say whether Node.js is the right pick, or whether another language or a ready service is better.

Describe your projectSee Gaia Lens