Search across all documentation pages
11 pages in this section.
11 examples to get you started with Node.js Scripts -- 8 basic and 3 intermediate.
How to download and install Node.js and npm on macOS and Windows — including what LTS means, the different installation methods, and which one to pick.
The practical differences between pnpm and npm — how they install packages, manage disk space, handle lockfiles, and when to pick one over the other.
How to run plain JavaScript files with Node.js — direct execution, npm scripts, shebang lines, and parsing command-line arguments.
Different ways to execute TypeScript files without a manual compile step — tsx, ts-node, Node 22's native type stripping, and the traditional tsc + node pipelin
Understanding Node.js's two module systems — when to use each, how to migrate, and how to support both consumers from a single package.
Configure ESLint flat config (eslint.config.js) for Node.js script projects with TypeScript support, Node-specific rules, and type-aware linting.
Common patterns for writing Node.js utility scripts — file I/O, globbing, colored output, interactive prompts, and spinners.
Use Node.js EventEmitter for publish-subscribe patterns, with typed events and async handlers.
Three ways to build HTTP servers in Node.js — node:http for zero dependencies, Express for familiarity, Fastify for performance.
A condensed summary of the 25 most important best practices drawn from every page in this section.