0% found this document useful (0 votes)
51 views1 page

Nodejs CLI Flags

Uploaded by

Jérôme Antoine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views1 page

Nodejs CLI Flags

Uploaded by

Jérôme Antoine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CHEAT SHEET

developers.redhat.com | @RHDevelopers

Node.js - Command Line Flags

This cheat sheet covers the most popular/used node.js command line ags.

RUNNING YOUR CODE

-v, --version --report-on-fatalerror


Prints the current version of node.js you use Generates node report on fatal error
-e, --eval --report-uncaught-exception
Evaluates the current argument as JavaScript Generates diagnostic report on uncaught exceptions
-c, --check
Checks the syntax of a script without executing it CONTROLLING/INVESTIGATING MEMORY USE
-i, --interactive
--max-old-space-size
Opens the node.js REPL (Read-Eval-Print-Loop)
Sets the size of the heap
-r, --require
--trace_gc
Pre-loads a speci c module at start-up
Turns on gc logging
--no-deprecation
--heap-prof
Silences the deprecation warnings
Enables heap pro ling
--no-warnings
--heapsnapshot-signal=signal
Silences all warnings (including deprecations)
Generates heap snapshot on speci ed signal
NODE_OPTIONS=
Environment variable that you can use to set command line options
CPU PERFORMANCE INVESTIGATION

CODE HYGIENE --prof


Generates V8 pro ler output.
--pending-deprecation
--prof-process
Emits pending deprecation warnings
Process V8 pro ler output generated using --prof
--trace-deprecation
--cpu-prof
Prints the stack trace for deprecations
Starts the V8 CPU pro ler on start up, and write the CPU pro le to
--throw-deprecation disk before exit
Throws error on deprecation
--trace-warnings DEBUGGING
Prints the stack trace for warnings
--inspect-brk[=[host:]port]

INITIAL PROBLEM INVESTIGATION Activates inspector on host:port and break at start of user script
--inspect[=[host:]port]
--report-on-signal Activates inspector on host:port (default: 127.0.0.1:9229)
Generates node report on signal

You might also like