cheat sheet
Node.js
Server-side JavaScript runtime built on the V8 engine.
#javascript#node#runtimeupdated 06-10-2026
Running code
| Task | Command |
|---|---|
| Run a file | node app.js |
| Run with watch | node --watch app.js |
| REPL | node |
| Run a one-liner | node -e "console.log(process.version)" |
| Load env file | node --env-file=.env app.js |
Project basics
| Task | Command |
|---|---|
| Init package | npm init -y |
| Run a script | npm run build |
| Run a binary | npx tsc |
| Check version | node -v |
Built-in modules
| Module | Purpose |
|---|---|
node:fs | File system access |
node:path | Path manipulation |
node:http | HTTP server/client |
node:crypto | Hashing and crypto |
node:test | Built-in test runner |