Node.js vocabulary

74 Node.js terms, from Novice to Master. Start with the basics or jump to a level.

Updated

Novice

console.log in Node
Prints to the terminal.
LTS
Long-term support: the Node.js version that keeps getting fixes the longest, and the one to install for work and for courses.
Module (require / import)
A file that shares code through exports.
node Command
Runs a JavaScript file with Node.
Node.js
JavaScript running on servers and computers, outside the browser.
node_modules
The folder of installed packages; never committed.
npm
Node's package manager and package registry.
npm install
Installs packages.
npm scripts
Named commands in package.json run with npm run.
package.json
Describes a Node project, its scripts and dependencies.
REPL
Node's interactive prompt, opened by typing node on its own: it reads a line, runs it, prints its value and waits for the next; .exit leaves it.

Apprentice

Built-In Module
A module that comes with Node, such as node:fs/promises or node:path, imported with node: in front and nothing to install.
dotenv
Loads a .env file into process.env.
ENOENT
The error code Node gives when there's no file or folder at a path, short for "error: no entry".
ES Modules in Node
The modern import/export module system in Node.
Express
The most popular Node web framework.
express.json()
Parses JSON request bodies into req.body.
fs Module
The built-in module for files.
http Module
Node's built-in module for web servers: http.createServer makes a server from a function that answers every request.
Middleware in Express
Functions that run before handlers and call next().
NODE_ENV
The environment variable that says where Node code is running, such as development, test or production.
nodemon and --watch
Restarts the app automatically when files change.
npx
Runs a package command without installing it globally.
path Module
Builds file paths that work on every OS.
process.argv
The array of words that started a Node program: node's path, the script's path, then every word typed after them.
process.env
Holds environment variables.
Query Parameters in Express
The query string's name=value pairs, which Express reads into req.query, always as text, or undefined when one wasn't sent.
req and res
The request and response objects in a handler.
res.json()
Sends data as a JSON response in Express: it turns the data into JSON text, sets the Content-Type header and ends the response.
Route in Express
Connects a method and path to a handler.
Route Parameters in Express
URL parts captured into req.params.
Static Files in Express
Serves files from a folder.

Journeyman

async/await in Node
Writing promise code that reads top to bottom.
Buffer
Holds raw binary data.
Callback
A function run when work finishes; Node's original style.
CORS in Express
Middleware letting other domains call your API.
Error-Handling Middleware
Four-parameter middleware that turns errors into responses.
Event Loop
How Node juggles many tasks on one thread.
EventEmitter
Objects that emit events for listeners.
helmet
An Express middleware package that adds a set of security headers to every answer and removes X-Powered-By.
Job Queue
A line of work waiting to run after the response, one job after another: in memory for work that can be redone, or in a job service such as BullMQ when jobs must survive a restart.
mongodb-memory-server
An npm package that starts a real, throwaway MongoDB server for tests, in a temporary folder on a free port, and stops it afterward.
multer
The Express middleware that reads forms sent as multipart/form-data, saving each uploaded file and putting its details in req.file and the text fields in req.body.
node:test
Node's built-in test runner.
Non-Blocking I/O
Not waiting on files or network, so other work continues.
npm audit
Checks a project's installed packages against a list of known security holes and reports each by severity; npm audit fix updates what it can.
npm ci
Clean install: deletes node_modules and installs exactly the versions package-lock.json records, without changing any file.
package-lock.json
Records exact package versions; commit it.
pino
A fast Node logger that writes each log as one JSON line with a level, a time and any fields you add; pino-http adds a line for every request.
Promises in Node
Objects representing results that arrive later.
Router
Groups related routes, mounted under a path.
Semantic Versioning
MAJOR.MINOR.PATCH version numbers and ranges like ^1.4.0.
Socket.IO
A library on top of WebSockets with rooms and automatic reconnects built in; the page and the server must both use it.
Streams
Processing data piece by piece instead of all at once.
Supertest
A testing package that sends HTTP requests straight to a Node app, such as an Express app, with no server running, and lets a test check the response.
util.parseArgs
Node's built-in function that reads a command's options, such as --runner Leo or -r Leo, with defaults.
Version Range
The versions of a package a project accepts, written in package.json: ^4.21.0 allows any newer 4.x, ~4.21.0 only newer 4.21.x fixes.
ws
The package most Node projects use for WebSockets: a WebSocketServer for the server, and a WebSocket client for Node.

Freelancer

autocannon
A Node load-testing tool that sends many HTTP requests at once and reports latency and requests per second.
Child Process
Runs other programs from Node.
Cluster
Runs a process per CPU core sharing one port.
Fastify
A fast, modern Node web framework.
Graceful Shutdown
Stopping a server without cutting anyone off: stop taking new requests, let the ones in progress finish, then close the database.
libuv
The C library providing Node's event loop.
NestJS
A structured TypeScript framework for Node.
Pipeline
Node's function, from node:stream/promises, that joins a readable stream to a writable one, pausing the reader when the writer falls behind and passing any error on.
PM2
Keeps Node apps running and restarts them.
pnpm and Yarn
Faster alternative package managers.
TypeScript in Node
Writing Node apps in TypeScript.
Worker Threads
Running heavy work on separate threads.

Master

Backpressure
Slowing a source when its destination can't keep up.
Deno and Bun
Newer JavaScript runtimes competing with Node.
Microtask Queue
Where promise callbacks wait; they run before timers.
V8
The JavaScript engine inside Chrome and Node.

More subjects in Back-End Frameworks