Node.js Command Line Options

There is a wide assortment of order line alternatives in Node.js. These alternatives give numerous approaches to execute contents and other accommodating run-time choices. We should see the rundown of Node.js order line alternatives:
Index Option Description
1. v, - version It is utilized to print hub's version.
2. -h, - help It is utilized to print hub direction line alternatives.
3. -e, - eval "script" It assesses the accompanying contention as JavaScript. The modules which are predefined in the REPL can likewise be utilized in script.
4. -p, - print "script" It is indistinguishable to - e yet prints the result.
5. -c, - check Syntax check the content without executing.
6. -I, - interactive It opens the REPL regardless of whether stdin does not have all the earmarks of being a terminal.
7. -r, - require module It is utilized to preload the predetermined module at startup. It pursues require's() module goals rules. Module might be either a way to a record, or a hub module name.
8. - - no-deprecation Silence belittling warnings.
9. - - follow deprecation It is utilized to print stack follows for deprecations.
10. - - toss deprecation It tosses mistakes for deprecations.
11. - - no-warnings It quietness all procedure admonitions (counting deprecations).
12. - - follow warnings It prints stack follows for procedure alerts (counting deprecations).
13. - - follow match up io It prints a stack follow at whatever point synchronous I/o is recognized after the primary turn of the occasion loop.
14. - - zero-fill-buffers Automatically zero-fills all recently allotted support and slowbuffer instances.
15. - - track-pile objects It tracks pile object distributions for pile snapshots.
16. - - prof-process It forms V8 profiler yield created utilizing the v8 choice - prof.
17. - - V8-options It prints V8 order line options.
18. - - tls-figure list=list It determines an elective default tls figure list. (requires node.js to be worked with crypto support. (default))
19. - - empower fips It empowers fips-agreeable crypto at startup. (requires node.js to be worked with ./arrange - openssl-fips)
20. - - power fips It powers fips-agreeable crypto on startup. (can't be incapacitated from content code.) (same necessities as - empower fips)
21. - - icu-information dir=file It determines ICU information load way. (Supersedes node_icu_data)

Node.js Command Line Options Examples

To see the version of the running Node:

Open Node.js command prompt and run command node -v or node --version

command line options

For Help:

Use command node ?h or node --help

To evaluate an argument (but not print result):

Use command node -e, --eval "script"

To evaluate an argument and print result also:

Use command node -p "script"

To open REPL even if stdin doesn't appear:

Use command node -i, or node --interactive

welookups is optimized for learning.© welookups. 2018 - 2019 All Right Reserved and you agree to have read and accepted our term and condition.