Node.js
Run Commands
Execute Node.js scripts and applications from the command line. Learn to run files, evaluate expressions, use experimental features, and configure the runtime environment.
8 commands
Pro Tips
Use 'node --watch app.js' (Node 18+) for automatic restarts on file changes — no nodemon needed.
Use 'node -e "console.log(process.versions)"' to quickly check installed versions of V8, OpenSSL, etc.
Enable ESM in CommonJS projects with 'node --experimental-vm-modules' or rename files to .mjs.
Common Mistakes
--experimental flags can change or be removed between Node.js versions. Don't rely on them in production.
node --watch restarts the entire process on changes. In-flight requests are dropped — use proper graceful shutdown.