typestar

Node.js

18 steps in 8 sets of JavaScript.

JavaScript on the server. Modules and paths, the file system, streams, the process object, events and timers, network, and finally crypto and child processes.

Eighteen steps through the standard library, which has quietly become good enough that a lot of small tools need no dependencies at all.

Start this tour

Modules & paths

  • ES modulesimport and export, with the named and default forms.
  • Pathsjoin, resolve, and taking a filename apart.

Files

Streams & lines

  • StreamsReading a file in chunks, and the pipeline that wires stages together.
  • Reading linesreadline turns a stream into lines, without loading the file.

The process

Events & timers

  • EventEmitterNode's own observer pattern, with once, off and error handling.
  • Timers as promisesnode:timers/promises gives awaitable delays and intervals.

Network

Crypto & processes

Encore

  • csv-report.jsA Node report: read a CSV, derive columns, group, and print a table.

The other JavaScript tours