cheat sheet

Node.js

Server-side JavaScript runtime built on the V8 engine.

#javascript#node#runtimeupdated 06-10-2026

Running code

TaskCommand
Run a filenode app.js
Run with watchnode --watch app.js
REPLnode
Run a one-linernode -e "console.log(process.version)"
Load env filenode --env-file=.env app.js

Project basics

TaskCommand
Init packagenpm init -y
Run a scriptnpm run build
Run a binarynpx tsc
Check versionnode -v

Built-in modules

ModulePurpose
node:fsFile system access
node:pathPath manipulation
node:httpHTTP server/client
node:cryptoHashing and crypto
node:testBuilt-in test runner