node/doc/node.1

505 lines
14 KiB
Groff
Raw Normal View History

.\"
.\" This manpage is written in mdoc(7).
.\"
.\" * Language reference:
.\" https://man.openbsd.org/mdoc.7
.\"
.\" * Atom editor support:
.\" https://atom.io/packages/language-roff
.\"
.\" * Linting changes:
.\" mandoc -Wall -Tlint /path/to/this.file # BSD
.\" groff -w all -z /path/to/this.file # GNU/Linux, macOS
.\"
.\"
.\" Before making changes, please note the following:
.\"
.\" * In Roff, each new sentence should begin on a new line. This gives
.\" the Roff formatter better control over text-spacing, line-wrapping,
.\" and paragraph justification.
.\"
.\" * Do not leave blank lines in the markup. If whitespace is desired
.\" for readability, put a dot in the first column to indicate a null/empty
.\" command. Comments and horizontal whitespace may optionally follow: each
.\" of these lines are an example of a null command immediately followed by
.\" a comment.
.\"
.\"======================================================================
.
.Dd 2018
.Dt NODE 1
.
.Sh NAME
.Nm node
.Nd server-side JavaScript runtime
.
.\"======================================================================
.Sh SYNOPSIS
.Nm node
.Op Ar options
.Op Ar v8-options
.Op Fl e Ar string | Ar script.js | Fl
.Op Fl -
.Op Ar arguments ...
.
.Nm node
.Cm inspect
.Op Fl e Ar string | Ar script.js | Fl | Ar <host>:<port>
.Ar ...
.
.Nm node
.Op Fl -v8-options
.
.\"======================================================================
.Sh DESCRIPTION
Node.js is a set of libraries for JavaScript which allows it to be used outside of the browser.
It is primarily focused on creating simple, easy-to-build network clients and servers.
.Pp
Execute
.Nm
without arguments to start a REPL.
.
.Sh OPTIONS
.Bl -tag -width 6n
.It Sy -
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
Alias for stdin, analogous to the use of - in other command-line utilities.
The executed script is read from stdin, and remaining arguments are passed to the script.
.
.It Fl -
Indicate the end of command-line options.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
Pass the rest of the arguments to the script.
.Pp
If no script filename or eval/print script is supplied prior to this, then
the next argument will be used as a script filename.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -abort-on-uncaught-exception
Aborting instead of exiting causes a core file to be generated for analysis.
.
.It Fl -completion-bash
Print source-able bash completion script for Node.js.
.
.It Fl -diagnostic-report-directory
Location at which the
.Sy diagnostic report
will be generated.
.
.It Fl -diagnostic-report-filename
Name of the file to which the
.Sy diagnostic report
will be written.
.
.It Fl -diagnostic-report-on-fatalerror
Enables the
.Sy diagnostic report
to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that leads to termination of the application, if
.Sy --experimental-report
is enabled. Useful to inspect various diagnostic data elements such as heap, stack, event loop state, resource consumption etc. to reason about the fatal error.
.
.It Fl -diagnostic-report-on-signal
Enables
.Sy diagnostic report
to be generated upon receiving the specified (or predefined) signal to the running Node.js process, if
.Sy --experimental-report
is enabled. Default signal is SIGUSR2.
.
.It Fl -diagnostic-report-signal
Sets or resets the signal for
.Sy diagnostic report
generation (not supported on Windows). Default signal is SIGUSR2.
.
.It Fl -diagnostic-report-uncaught-exception
Enables
.Sy diagnostic report
to be generated on un-caught exceptions, if
.Sy --experimental-report
is enabled. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -enable-fips
Enable FIPS-compliant crypto at startup.
Requires Node.js to be built with
.Sy ./configure --openssl-fips .
.
esm: phase two of new esm implementation This PR updates the current `--experimental-modules` implementation based on the work of the modules team and reflects Phase 2 of our new modules plan. The largest differences from the current implementation include * `packge.type` which can be either `module` or `commonjs` - `type: "commonjs"`: - `.js` is parsed as commonjs - default for entry point without an extension is commonjs - `type: "module"`: - `.js` is parsed as esm - does not support loading JSON or Native Module by default - default for entry point without an extension is esm * `--entry-type=[mode]` - allows you set the type on entry point. * A new file extension `.cjs`. - this is specifically to support importing commonjs in the `module` mode. - this is only in the esm loader, the commonjs loader remains untouched, but the extension will work in the old loader if you use the full file path. * `--es-module-specifier-resolution=[type]` - options are `explicit` (default) and `node` - by default our loader will not allow for optional extensions in the import, the path for a module must include the extension if there is one - by default our loader will not allow for importing directories that have an index file - developers can use `--es-module-specifier-resolution=node` to enable the commonjs specifier resolution algorithm - This is not a “feature” but rather an implementation for experimentation. It is expected to change before the flag is removed * `--experimental-json-loader` - the only way to import json when `"type": "module"` - when enable all `import 'thing.json'` will go through the experimental loader independent of mode - based on https://github.com/whatwg/html/issues/4315 * You can use `package.main` to set an entry point for a module - the file extensions used in main will be resolved based on the `type` of the module Refs: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md Refs: https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal Refs: https://github.com/nodejs/modules/pull/180 Refs: https://github.com/nodejs/ecmascript-modules/pull/6 Refs: https://github.com/nodejs/ecmascript-modules/pull/12 Refs: https://github.com/nodejs/ecmascript-modules/pull/28 Refs: https://github.com/nodejs/modules/issues/255 Refs: https://github.com/whatwg/html/issues/4315 Refs: https://github.com/w3c/webcomponents/issues/770 Co-authored-by: Myles Borins <MylesBorins@google.com> Co-authored-by: John-David Dalton <john.david.dalton@gmail.com> Co-authored-by: Evan Plaice <evanplaice@gmail.com> Co-authored-by: Geoffrey Booth <webmaster@geoffreybooth.com> Co-authored-by: Michaël Zasso <targos@protonmail.com> PR-URL: https://github.com/nodejs/node/pull/26745 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-08-28 15:28:46 +00:00
.It Fl -entry-type Ns = Ns Ar type
Set the top-level module resolution type.
.
.It Fl -es-module-specifier-resolution
Select extension resolution algorithm for ES Modules; either 'explicit' (default) or 'node'
.
.It Fl -experimental-json-modules
Enable experimental JSON interop support for the ES Module loader.
.
.It Fl -experimental-modules
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
Enable experimental ES module support and caching modules.
.
.It Fl -experimental-policy
Use the specified file as a security policy.
.
.It Fl -experimental-repl-await
Enable experimental top-level
.Sy await
keyword support in REPL.
.
.It Fl -experimental-report
Enable experimental
.Sy diagnostic report
feature.
.
.It Fl -experimental-vm-modules
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
Enable experimental ES module support in VM module.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -force-fips
Force FIPS-compliant crypto on startup
(Cannot be disabled from script code).
Same requirements as
.Fl -enable-fips .
.
.It Fl -frozen-intrinsics
Enable experimental frozen intrinsics support.
.
.It Fl -http-parser Ns = Ns Ar library
Chooses an HTTP parser library. Available values are
.Sy llhttp
or
.Sy legacy .
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -icu-data-dir Ns = Ns Ar file
Specify ICU data load path.
Overrides
.Ev NODE_ICU_DATA .
.
.It Fl -inspect-brk Ns = Ns Ar [host:]port
Activate inspector on
.Ar host:port
and break at start of user script.
.
.It Fl -inspect-port Ns = Ns Ar [host:]port
Set the
.Ar host:port
to be used when the inspector is activated.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -inspect Ns = Ns Ar [host:]port
Activate inspector on
.Ar host:port .
Default is
.Sy 127.0.0.1:9229 .
.Pp
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js instances for debugging and profiling.
It uses the Chrome DevTools Protocol.
.
.It Fl -loader Ns = Ns Ar file
Specify the
.Ar file
as a custom loader, to load
.Fl -experimental-modules .
.
.It Fl -max-http-header-size Ns = Ns Ar size
Specify the maximum size of HTTP headers in bytes. Defaults to 8KB.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -napi-modules
This option is a no-op.
It is kept for compatibility.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -no-deprecation
Silence deprecation warnings.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -no-force-async-hooks-checks
Disable runtime checks for `async_hooks`.
These will still be enabled dynamically when `async_hooks` is enabled.
.
.It Fl -no-warnings
process: add 'warning' event and process.emitWarning() In several places throughout the code we write directly to stderr to report warnings (deprecation, possible eventemitter memory leak). The current design of simply dumping the text to stderr is less than ideal. This PR introduces a new "process warnings" mechanism that emits 'warning' events on the global process object. These are invoked with a `warning` argument whose value is an Error object. By default, these warnings will be printed to stderr. This can be suppressed using the `--no-warnings` and `--no-deprecation` command line flags. For warnings, the 'warning' event will still be emitted by the process, allowing applications to handle the warnings in custom ways. The existing `--no-deprecation` flag will continue to supress all deprecation output generated by the core lib. The `--trace-warnings` command line flag will tell Node.js to print the full stack trace of warnings as part of the default handling. The existing `--no-deprecation`, `--throw-deprecation` and `--trace-deprecation` flags continue to work as they currently do, but the exact output of the warning message is modified to occur on process.nextTick(). The stack trace for the warnings and deprecations preserve and point to the correct call site. A new `process.emitWarning()` API is provided to permit userland to emit warnings and deprecations using the same consistent mechanism. Test cases and documentation are included. PR-URL: https://github.com/nodejs/node/pull/4782 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-01-20 19:38:35 +00:00
Silence all process warnings (including deprecations).
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -openssl-config Ns = Ns Ar file
Load an OpenSSL configuration file on startup.
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
.Sy ./configure --openssl-fips .
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -pending-deprecation
Emit pending deprecation warnings.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -preserve-symlinks
Instructs the module loader to preserve symbolic links when resolving and caching modules other than the main module.
.
.It Fl -preserve-symlinks-main
Instructs the module loader to preserve symbolic links when resolving and caching the main module.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.
.It Fl -prof
Generate V8 profiler output.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -prof-process
Process V8 profiler output generated using the V8 option
.Fl -prof .
.
.It Fl -redirect-warnings Ns = Ns Ar file
Write process warnings to the given
.Ar file
instead of printing to stderr.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -throw-deprecation
Throw errors for deprecations.
.
.It Fl -title Ns = Ns Ar title
Specify process.title on startup.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -tls-cipher-list Ns = Ns Ar list
Specify an alternative default TLS cipher list.
Requires Node.js to be built with crypto support. (Default)
.
tls: support TLSv1.3 This introduces TLS1.3 support and makes it the default max protocol, but also supports CLI/NODE_OPTIONS switches to disable it if necessary. TLS1.3 is a major update to the TLS protocol, with many security enhancements. It should be preferred over TLS1.2 whenever possible. TLS1.3 is different enough that even though the OpenSSL APIs are technically API/ABI compatible, that when TLS1.3 is negotiated, the timing of protocol records and of callbacks broke assumptions hard-coded into the 'tls' module. This change introduces no API incompatibilities when TLS1.2 is negotiated. It is the intention that it be backported to current and LTS release lines with the default maximum TLS protocol reset to 'TLSv1.2'. This will allow users of those lines to explicitly enable TLS1.3 if they want. API incompatibilities between TLS1.2 and TLS1.3 are: - Renegotiation is not supported by TLS1.3 protocol, attempts to call `.renegotiate()` will always fail. - Compiling against a system OpenSSL lower than 1.1.1 is no longer supported (OpenSSL-1.1.0 used to be supported with configure flags). - Variations of `conn.write('data'); conn.destroy()` have undefined behaviour according to the streams API. They may or may not send the 'data', and may or may not cause a ERR_STREAM_DESTROYED error to be emitted. This has always been true, but conditions under which the write suceeds is slightly but observably different when TLS1.3 is negotiated vs when TLS1.2 or below is negotiated. - If TLS1.3 is negotiated, and a server calls `conn.end()` in its 'secureConnection' listener without any data being written, the client will not receive session tickets (no 'session' events will be emitted, and `conn.getSession()` will never return a resumable session). - The return value of `conn.getSession()` API may not return a resumable session if called right after the handshake. The effect will be that clients using the legacy `getSession()` API will resume sessions if TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is negotiated. See https://github.com/nodejs/node/pull/25831 for more information. PR-URL: https://github.com/nodejs/node/pull/26209 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-29 01:58:08 +00:00
.It Fl -tls-max-v1.2
Set default maxVersion to 'TLSv1.2'. Use to disable support for TLSv1.3.
.
tls: support TLSv1.3 This introduces TLS1.3 support and makes it the default max protocol, but also supports CLI/NODE_OPTIONS switches to disable it if necessary. TLS1.3 is a major update to the TLS protocol, with many security enhancements. It should be preferred over TLS1.2 whenever possible. TLS1.3 is different enough that even though the OpenSSL APIs are technically API/ABI compatible, that when TLS1.3 is negotiated, the timing of protocol records and of callbacks broke assumptions hard-coded into the 'tls' module. This change introduces no API incompatibilities when TLS1.2 is negotiated. It is the intention that it be backported to current and LTS release lines with the default maximum TLS protocol reset to 'TLSv1.2'. This will allow users of those lines to explicitly enable TLS1.3 if they want. API incompatibilities between TLS1.2 and TLS1.3 are: - Renegotiation is not supported by TLS1.3 protocol, attempts to call `.renegotiate()` will always fail. - Compiling against a system OpenSSL lower than 1.1.1 is no longer supported (OpenSSL-1.1.0 used to be supported with configure flags). - Variations of `conn.write('data'); conn.destroy()` have undefined behaviour according to the streams API. They may or may not send the 'data', and may or may not cause a ERR_STREAM_DESTROYED error to be emitted. This has always been true, but conditions under which the write suceeds is slightly but observably different when TLS1.3 is negotiated vs when TLS1.2 or below is negotiated. - If TLS1.3 is negotiated, and a server calls `conn.end()` in its 'secureConnection' listener without any data being written, the client will not receive session tickets (no 'session' events will be emitted, and `conn.getSession()` will never return a resumable session). - The return value of `conn.getSession()` API may not return a resumable session if called right after the handshake. The effect will be that clients using the legacy `getSession()` API will resume sessions if TLS1.2 is negotiated, but will do full handshakes if TLS1.3 is negotiated. See https://github.com/nodejs/node/pull/25831 for more information. PR-URL: https://github.com/nodejs/node/pull/26209 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-29 01:58:08 +00:00
.It Fl -tls-max-v1.3
Set default maxVersion to 'TLSv1.3'. Use to enable support for TLSv1.3.
.
.It Fl -tls-min-v1.0
Set default minVersion to 'TLSv1'. Use for compatibility with old TLS clients
or servers.
.
.It Fl -tls-min-v1.1
Set default minVersion to 'TLSv1.1'. Use for compatibility with old TLS clients
or servers.
.
.It Fl -tls-min-v1.3
Set default minVersion to 'TLSv1.3'. Use to disable support for TLSv1.2 in
favour of TLSv1.3, which is more secure.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -trace-deprecation
Print stack traces for deprecations.
.
.It Fl -trace-event-categories Ar categories
A comma-separated list of categories that should be traced when trace event tracing is enabled using
.Fl -trace-events-enabled .
.
.It Fl -trace-event-file-pattern Ar pattern
Template string specifying the filepath for the trace event data, it
supports
.Sy ${rotation}
and
.Sy ${pid} .
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -trace-events-enabled
Enable the collection of trace event tracing information.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -trace-sync-io
Print a stack trace whenever synchronous I/O is detected after the first turn of the event loop.
.
.It Fl -trace-warnings
Print stack traces for process warnings (including deprecations).
.
.It Fl -track-heap-objects
Track heap object allocations for heap snapshots.
.
.It Fl -use-bundled-ca , Fl -use-openssl-ca
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
Use bundled Mozilla CA store as supplied by current Node.js version or use OpenSSL's default CA store.
The default store is selectable at build-time.
.Pp
The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that is fixed at release time.
It is identical on all supported platforms.
.Pp
Using OpenSSL store allows for external modifications of the store.
For most Linux and BSD distributions, this store is maintained by the distribution maintainers and system administrators.
OpenSSL CA store location is dependent on configuration of the OpenSSL library but this can be altered at runtime using environment variables.
.Pp
See
.Ev SSL_CERT_DIR
and
.Ev SSL_CERT_FILE .
.
.It Fl -v8-options
Print V8 command-line options.
.
.It Fl -v8-pool-size Ns = Ns Ar num
Set V8's thread pool size which will be used to allocate background jobs.
If set to 0 then V8 will choose an appropriate size of the thread pool based on the number of online processors.
If the value provided is larger than V8's maximum, then the largest value will be chosen.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl -zero-fill-buffers
Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl c , Fl -check
Check the script's syntax without executing it.
Exits with an error code if script is invalid.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl e , Fl -eval Ar string
Evaluate
.Ar string
as JavaScript.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl h , Fl -help
Print command-line options.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
The output of this option is less detailed than this document.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl i , Fl -interactive
Open the REPL even if stdin does not appear to be a terminal.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl p , Fl -print Ar string
Identical to
.Fl e ,
but prints the result.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl r , Fl -require Ar module
Preload the specified
.Ar module
at startup.
Follows `require()`'s module resolution rules.
.Ar module
may be either a path to a file, or a Node.js module name.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Fl v , Fl -version
Print node's version.
.El
.
.\" =====================================================================
.Sh ENVIRONMENT
.Bl -tag -width 6n
.It Ev NODE_DEBUG Ar modules...
Comma-separated list of core modules that should print debug information.
.
.It Ev NODE_DEBUG_NATIVE Ar modules...
Comma-separated list of C++ core modules that should print debug information.
.
.It Ev NODE_DISABLE_COLORS
When set to
.Ar 1 ,
colors will not be used in the REPL.
.
.It Ev NODE_EXTRA_CA_CERTS Ar file
When set, the well-known
.Dq root
CAs (like VeriSign) will be extended with the extra certificates in
.Ar file .
The file should consist of one or more trusted certificates in PEM format.
.Pp
If
.Ar file
is missing or misformatted, a message will be emitted once using
.Sy process.emitWarning() ,
but any errors are otherwise ignored.
.Pp
This environment variable is ignored when `node` runs as setuid root or
has Linux file capabilities set.
.
.It Ev NODE_ICU_DATA Ar file
Data path for ICU (Intl object) data.
Will extend linked-in data when compiled with small-icu support.
.
.It Ev NODE_NO_WARNINGS
When set to
.Ar 1 ,
process warnings are silenced.
.
.It Ev NODE_OPTIONS Ar options...
A space-separated list of command-line
.Ar options ,
which are interpreted as if they had been specified on the command-line before the actual command (so they can be overridden).
Node.js will exit with an error if an option that is not allowed in the environment is used, such as
.Fl -print
or a script file.
.
.It Ev NODE_PATH Ar directories...
A colon-separated list of
.Ar directories
prefixed to the module search path.
.
.It Ev NODE_PENDING_DEPRECATION
When set to
.Ar 1 ,
emit pending deprecation warnings.
.
.It Ev NODE_PRESERVE_SYMLINKS
When set to
.Ar 1 ,
the module loader preserves symbolic links when resolving and caching modules.
.
doc, src: sort + fill up cli options and env vars * Alphabetize the command line options and environment variables in doc/api/cli.md for consistency and readability. * Update doc/api/cli.md to include command line options being printed in the `node.PrintHelp()` function in src/node.cc but weren't otherwise documented in the cli spec. Options added include: --napi-modules --v8-pool-size=num --experimental-modules --experimental-vm-modules * ASCII sort the node man page command line options. This change brings sort order consistency between the cli options displayed in doc/node.1 and the cli options enumerated in other areas of the project. Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca` to correspond with the order of the options as displayed. * Update `node.PrintHelp()` function to return command line options and environment variables sorted in ASCII order. Additionally, add missing options as sourced from doc/api/cli.md. Options added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS` environment variable. Also update the comments in the `node.PrintHelp()` method to C++ style. * Create tests to validate that the newly ASCII sorted cli options in the `node.PrintHelp()` function are being returned according to build configurations as expected. PR-URL: https://github.com/nodejs/node/pull/19878 Refs: https://github.com/nodejs/node/issues/19814 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-08 06:33:19 +00:00
.It Ev NODE_REDIRECT_WARNINGS Ar file
Write process warnings to the given
.Ar file
instead of printing to stderr.
Equivalent to passing
.Fl -redirect-warnings Ar file
on command-line.
.It Ev NODE_REPL_HISTORY Ar file
Path to the
.Ar file
used to store persistent REPL history.
The default path is
.Sy ~/.node_repl_history ,
which is overridden by this variable.
Setting the value to an empty string ("" or " ") will disable persistent REPL history.
.
.It Ev NODE_TLS_REJECT_UNAUTHORIZED
When set to
.Ar 0 ,
TLS certificate validation is disabled.
.
.It Ev NODE_V8_COVERAGE Ar dir
When set, Node.js writes JavaScript code coverage information to
.Ar dir .
.
.It Ev OPENSSL_CONF Ar file
Load an OpenSSL configuration file on startup.
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
.Sy ./configure --openssl-fips .
.Pp
If the
.Fl -openssl-config
command-line option is used, this environment variable is ignored.
.
.It Ev SSL_CERT_DIR Ar dir
If
.Fl -use-openssl-ca
is enabled, this overrides and sets OpenSSL's directory containing trusted certificates.
.
.It Ev SSL_CERT_FILE Ar file
If
.Fl -use-openssl-ca
is enabled, this overrides and sets OpenSSL's file containing trusted certificates.
.
.It Ev UV_THREADPOOL_SIZE Ar size
Sets the number of threads used in libuv's threadpool to
.Ar size .
.
.El
.\"=====================================================================
.Sh BUGS
Bugs are tracked in GitHub Issues:
.Sy https://github.com/nodejs/node/issues
.
.\"======================================================================
.Sh COPYRIGHT
Copyright Node.js contributors.
Node.js is available under the MIT license.
.
.Pp
Node.js also includes external libraries that are available under a variety of licenses.
See
.Sy https://github.com/nodejs/node/blob/master/LICENSE
for the full license text.
.
.\"======================================================================
.Sh SEE ALSO
Website:
.Sy https://nodejs.org/
.
.Pp
Documentation:
.Sy https://nodejs.org/api/
.
.Pp
GitHub repository & Issue Tracker:
.Sy https://github.com/nodejs/node
.
.Pp
IRC (general questions):
.Sy "chat.freenode.net #node.js"
(unofficial)
.
.Pp
IRC (Node.js core development):
.Sy "chat.freenode.net #node-dev"
.
.\"======================================================================
.Sh AUTHORS
Written and maintained by 1000+ contributors:
.Sy https://github.com/nodejs/node/blob/master/AUTHORS