Search across all documentation pages
12 pages in this section.
Explore 11 Node.js script examples, including 8 basic and 3 intermediate, to master script creation and execution.
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.
Implement publish-subscribe patterns in Node.js using EventEmitter. Learn to subscribe, unsubscribe, and publish typed events with async handlers.
Three ways to build HTTP servers in Node.js - node:http for zero dependencies, Express for familiarity, Fastify for performance.
Learn 25 essential Node.js script best practices, from configuring typescript-eslint and parserOptions.project to managing module systems and explicit .js extensions.
A single-page roundup of every highlight bullet from the 11 pages in the Node.js Scripts section, grouped by source page so you can scan all 66 takeaways without opening each article individually.