Skip to content

Core APIs

Node.js ships with a rich set of built-in globals and modules that are available without installing anything. These are the primitives every Node.js program is built on.

Key globals and modules covered in this module:

  • process — access to the running process: environment variables, command-line arguments, the working directory, the platform, and lifecycle control.
  • Buffer — a fixed-length chunk of raw binary data. Predates typed arrays and remains the standard way to work with bytes in Node streams and networking.
  • node:fs / node:fs/promises — read, write, and navigate the filesystem. The promises API lets you use async/await natively.
  • EventEmitter — the backbone of Node’s event-driven architecture. Streams, the HTTP server, and many third-party libraries all extend EventEmitter.
LessonTopic
process & envprocess.argv, process.env, exit codes, and platform detection
BufferBinary data, encodings, and byte-level manipulation
File Systemfs callbacks, sync APIs, and the fs/promises interface
EventEmitterCustom events, listeners, and the once / removeListener lifecycle

The snippet below reads two globals that are available in every Node.js process without any require or import:

Node.js

Needs the Node.js runtime — open in StackBlitz to run.

Which of the following is a true Node.js global — available without any import?
What is the recommended modern prefix for importing a Node.js built-in module?