Code Reference

Glossary

Node.js · Reference cheat sheet

Glossary

Node.js · Reference cheat sheet


📋 Overview

Alphabetical glossary of Node.js runtime, modules, and server-framework terms.

🔧 Core concepts

TermDefinition
BufferFixed-size binary data type for bytes.
CJSCommonJS modules using require / module.exports.
Event loopCore scheduler for timers, I/O, and microtasks.
ESMECMAScript modules using import / export.
ExpressMinimal, unopinionated HTTP framework.
FastifySchema-oriented, high-performance HTTP framework.
libuvC library providing Node’s async I/O and threadpool.
MiddlewareFunction in a pipeline that can handle or forward a request.
npmDefault package manager and registry client.
package.jsonManifest for deps, scripts, and package metadata.
Plugin (Fastify)Encapsulated unit of routes, hooks, and decorations.
semverSemantic versioning (major.minor.patch).
StreamAbstract interface for streaming data (readable/writable).
Worker threadSeparate V8 isolate for CPU-heavy work.
node: prefixBuilt-in module import specifier (node:fs).

💡 Examples

Built-in import:

import fs from "node:fs/promises";
import { createServer } from "node:http";

Detect ESM vs CJS mentally:

{ "type": "module" }
// with "type": "module" → import works
// without → require is default unless .mjs

⚠️ Pitfalls

  • “Node version” vs “framework version” — always note both when debugging.
  • Global installs hide which binary your shell resolves — prefer local tooling.

On this page