Node.js Cheat Sheet
This cheat sheet helps developers master the most useful command-line flags to customize Node.js’s behavior. You’ll save time and energy looking up how to do everyday development tasks like executing scripts, debugging, and monitoring your Node.js applications.
In this cheat sheet, you will learn how to:
- Quickly test code with the Node.js REPL.
- Require specific modules at startup.
- Automatically detect deprecated APIs and trace warnings.
- Catch production problems like slow performance and memory leaks with diagnostic reports.
- Investigate Node.js process memory use with the garbage collector and heap snapshots.
- Collect CPU metrics to understand Node.js application performance.
- Initialize the built-in debugger to troubleshoot Node.js applications and scripts.
Cheat Sheet Excerpt“
-v, --version: Prints the current version of node.js you use
-c, --check: Checks the syntax of a script without executing it
-i, --interactive: Opens the node.js REPL (Read-Eval-Print-Loop)
-r, --require: Pre-loads a specic module at start-up
Want to see more? Get the full cheat sheet.