2016-02-29 21:49:30 +00:00
|
|
|
.TH NODE 1 2016 Node.js Node.js
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-07-21 12:12:16 +00:00
|
|
|
.\" This is a man page comment.
|
|
|
|
|
|
|
|
.\" Man page syntax (actually roff syntax) is somewhat obscure, but the
|
|
|
|
.\" important part is is that .<letter> specifies <letter>'s syntax for that
|
|
|
|
.\" line, and \f<letter> specifies it for the characters that follow.
|
|
|
|
|
|
|
|
.\" .B Bold line
|
|
|
|
.\" .I Italic line (Rendered as underlined text in terminals)
|
|
|
|
.\" .BI Alternating bold/italics without spaces between arguments.
|
|
|
|
.\" Use `\ ` to include an "unpaddable" (literal) space in the output.
|
|
|
|
.\" .RI Alternating roman/italic
|
|
|
|
|
|
|
|
.\" See http://liw.fi/manpages/ for an overview, or http://www.troff.org/54.pdf
|
|
|
|
.\" for detailed language reference.
|
|
|
|
|
|
|
|
.\" Macro to display an underlined URL in bold
|
|
|
|
.de ur
|
|
|
|
.nr CF \\n(.f
|
|
|
|
.ft 4
|
|
|
|
\\$1
|
|
|
|
.ft \\n(CF
|
|
|
|
..
|
|
|
|
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.SH NAME
|
|
|
|
|
|
|
|
node \- Server-side JavaScript runtime
|
2014-02-14 19:01:49 +00:00
|
|
|
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.SH SYNOPSIS
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2015-08-13 16:14:34 +00:00
|
|
|
.B node
|
2016-07-21 12:12:16 +00:00
|
|
|
.RI [ options ]
|
|
|
|
.RI [ v8\ options ]
|
|
|
|
.RI [ script.js \ |
|
|
|
|
.B -e
|
2017-05-13 07:58:18 +00:00
|
|
|
.RI \&" script \&"
|
|
|
|
.R |
|
|
|
|
.B -
|
|
|
|
.R ]
|
2016-12-30 05:28:38 +00:00
|
|
|
.B [--]
|
2016-07-21 12:12:16 +00:00
|
|
|
.RI [ arguments ]
|
2014-02-14 19:01:49 +00:00
|
|
|
.br
|
2016-02-29 21:49:30 +00:00
|
|
|
.B node debug
|
2016-07-21 12:12:16 +00:00
|
|
|
.RI [ script.js " | "
|
|
|
|
.B \-e
|
|
|
|
.RI \&" script \&"\ |
|
|
|
|
.IR <host>:<port> ]
|
|
|
|
.I ...
|
2016-02-29 21:49:30 +00:00
|
|
|
.br
|
|
|
|
.B node
|
2016-07-21 12:12:16 +00:00
|
|
|
.RB [ \-\-v8-options ]
|
2014-02-14 19:01:49 +00:00
|
|
|
|
|
|
|
Execute without arguments to start the REPL.
|
|
|
|
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
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.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-v ", " \-\-version
|
|
|
|
Print node's version.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-h ", " \-\-help
|
|
|
|
Print node command line options.
|
|
|
|
The output of this option is less detailed than this document.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-e ", " \-\-eval " " \fR"\fIscript\fR"
|
|
|
|
Evaluate the following argument as JavaScript.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-p ", " \-\-print " " \fR"\fIscript\fR"
|
|
|
|
Identical to \fB-e\fR but prints the result.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-c ", " \-\-check
|
|
|
|
Syntax check the script without executing.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-i ", " \-\-interactive
|
2016-04-27 17:25:11 +00:00
|
|
|
Open the REPL even if stdin does not appear to be a terminal.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-r ", " \-\-require " " \fImodule\fR
|
|
|
|
Preload the specified module at startup. Follows `require()`'s module resolution
|
|
|
|
rules. \fImodule\fR may be either a path to a file, or a node module name.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2017-03-16 02:34:51 +00:00
|
|
|
.TP
|
2017-03-28 15:54:30 +00:00
|
|
|
.BR \-\-inspect \fI[=[host:]port]\fR
|
2017-03-16 02:34:51 +00:00
|
|
|
Activate inspector on host:port. Default is 127.0.0.1:9229.
|
|
|
|
|
|
|
|
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js
|
|
|
|
instances for debugging and profiling. It uses the Chrome Debugging Protocol.
|
|
|
|
|
|
|
|
.TP
|
2017-03-28 15:54:30 +00:00
|
|
|
.BR \-\-inspect-brk \fI[=[host:]port]\fR
|
2017-03-16 02:34:51 +00:00
|
|
|
Activate inspector on host:port and break at start of user script.
|
|
|
|
|
2017-04-22 03:34:54 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-inspect-port \fI=[host:]port\fR
|
|
|
|
Set the host:port to be used when the inspector is activated.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-no\-deprecation
|
|
|
|
Silence deprecation warnings.
|
2015-08-17 21:33:13 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-trace\-deprecation
|
|
|
|
Print stack traces for deprecations.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-throw\-deprecation
|
|
|
|
Throw errors for deprecations.
|
2015-02-17 22:37:37 +00:00
|
|
|
|
2017-03-11 20:18:53 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-pending\-deprecation
|
|
|
|
Emit pending deprecation warnings.
|
|
|
|
|
2016-01-20 19:38:35 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-no\-warnings
|
|
|
|
Silence all process warnings (including deprecations).
|
|
|
|
|
2017-03-20 21:55:26 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-napi\-modules
|
|
|
|
Enable loading native modules compiled with the ABI-stable Node.js API (N-API)
|
|
|
|
(experimental).
|
|
|
|
|
2016-01-20 19:38:35 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-trace\-warnings
|
|
|
|
Print stack traces for process warnings (including deprecations).
|
|
|
|
|
2016-12-04 18:38:35 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-redirect\-warnings=\fIfile\fR
|
|
|
|
Write process warnings to the given file instead of printing to stderr.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-trace\-sync\-io
|
2016-04-27 17:25:11 +00:00
|
|
|
Print a stack trace whenever synchronous I/O is detected after the first turn
|
2016-02-29 21:49:30 +00:00
|
|
|
of the event loop.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-12-22 06:10:22 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-trace\-events\-enabled
|
|
|
|
Enables the collection of trace event tracing information.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-\-trace\-event\-categories " " \fIcategories\fR
|
|
|
|
A comma separated list of categories that should be traced when trace event
|
|
|
|
tracing is enabled using \fB--trace-events-enabled\fR.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-zero\-fill\-buffers
|
|
|
|
Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-05-02 23:31:20 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-preserve\-symlinks
|
|
|
|
Instructs the module loader to preserve symbolic links when resolving and
|
|
|
|
caching modules.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-track\-heap-objects
|
|
|
|
Track heap object allocations for heap snapshots.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-prof\-process
|
|
|
|
Process v8 profiler output generated using the v8 option \fB\-\-prof\fR
|
2015-07-09 16:15:26 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-v8\-options
|
|
|
|
Print v8 command line options.
|
2015-11-25 14:08:58 +00:00
|
|
|
|
2016-05-02 21:02:31 +00:00
|
|
|
Note: v8 options allow words to be separated by both dashes (\fB-\fR) or
|
|
|
|
underscores (\fB_\fR).
|
|
|
|
|
|
|
|
For example, \fB\-\-stack\-trace\-limit\fR is equivalent to
|
|
|
|
\fB\-\-stack\_trace\_limit\fR
|
|
|
|
|
2015-12-18 12:24:56 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-v8\-pool\-size =\fInum\fR
|
|
|
|
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
|
|
|
|
max then the largest value will be chosen.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-tls\-cipher\-list =\fIlist\fR
|
2016-05-09 15:15:45 +00:00
|
|
|
Specify an alternative default TLS cipher list. (Requires Node.js to be built
|
|
|
|
with crypto support. (Default))
|
2016-01-25 23:00:06 +00:00
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-enable\-fips
|
2016-05-09 15:15:45 +00:00
|
|
|
Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
|
|
|
|
\fB./configure \-\-openssl\-fips\fR)
|
2016-02-29 21:49:30 +00:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR \-\-force\-fips
|
2016-05-09 15:15:45 +00:00
|
|
|
Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
|
|
|
|
(Same requirements as \fB\-\-enable\-fips\fR)
|
2016-02-29 21:49:30 +00:00
|
|
|
|
2016-10-18 05:35:22 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-openssl\-config =\fIfile\fR
|
|
|
|
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
|
|
|
|
\fB./configure \-\-openssl\-fips\fR.
|
|
|
|
|
2016-12-21 10:16:39 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-use\-openssl\-ca,\-\-use\-bundled\-ca
|
|
|
|
Use OpenSSL's default CA store or use bundled Mozilla CA store as supplied by
|
|
|
|
current NodeJS version. The default store is selectable at build-time.
|
|
|
|
|
|
|
|
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
|
|
|
|
environmental variables.
|
|
|
|
|
|
|
|
The bundled CA store, as supplied by NodeJS, is a snapshot of Mozilla CA store
|
|
|
|
that is fixed at release time. It is identical on all supported platforms.
|
|
|
|
|
|
|
|
See \fBSSL_CERT_DIR\fR and \fBSSL_CERT_FILE\fR.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-icu\-data\-dir =\fIfile\fR
|
|
|
|
Specify ICU data load path. (overrides \fBNODE_ICU_DATA\fR)
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2017-05-13 07:58:18 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\fR
|
|
|
|
Alias for stdin, analogous to the use of - in other command line utilities,
|
|
|
|
meaning that the script will be read from stdin, and the rest of the options
|
|
|
|
are passed to that script.
|
|
|
|
|
2016-12-30 05:28:38 +00:00
|
|
|
.TP
|
|
|
|
.BR \-\-\fR
|
|
|
|
Indicate the end of node options. Pass the rest of the arguments to the script.
|
|
|
|
|
|
|
|
If no script filename or eval/print script is supplied prior to this, then
|
|
|
|
the next argument will be used as a script filename.
|
|
|
|
|
2014-02-14 19:01:49 +00:00
|
|
|
.SH ENVIRONMENT VARIABLES
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_DEBUG =\fImodule\fR[,\fI...\fR]
|
|
|
|
\',\'\-separated list of core modules that should print debug information.
|
|
|
|
|
|
|
|
.TP
|
2016-12-22 06:10:22 +00:00
|
|
|
.BR NODE_DISABLE_COLORS =\fI1\fR
|
|
|
|
When set to \fI1\fR, colors will not be used in the REPL.
|
2016-02-29 21:49:30 +00:00
|
|
|
|
|
|
|
.TP
|
2016-12-22 06:10:22 +00:00
|
|
|
.BR NODE_EXTRA_CA_CERTS =\fIfile\fR
|
|
|
|
When set, the well known "root" CAs (like VeriSign) will be extended with the
|
|
|
|
extra certificates in \fIfile\fR. The file should consist of one or more
|
|
|
|
trusted certificates in PEM format. A message will be emitted (once) with
|
|
|
|
\fBprocess.emitWarning()\fR if the file is missing or misformatted, but any
|
|
|
|
errors are otherwise ignored.
|
2016-02-29 21:49:30 +00:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR NODE_ICU_DATA =\fIfile\fR
|
2015-09-04 10:48:20 +00:00
|
|
|
Data path for ICU (Intl object) data. Will extend linked-in data when compiled
|
2016-02-29 21:49:30 +00:00
|
|
|
with small\-icu support.
|
|
|
|
|
2017-01-16 21:57:36 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_NO_WARNINGS =\fI1\fR
|
|
|
|
When set to \fI1\fR, process warnings are silenced.
|
|
|
|
|
2017-02-20 14:18:43 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_OPTIONS =\fIoptions...\fR
|
|
|
|
\fBoptions...\fR are interpreted as if they had been specified on the command
|
2017-06-16 15:49:20 +00:00
|
|
|
line before the actual command line (so they can be overridden). Node will exit
|
2017-02-20 14:18:43 +00:00
|
|
|
with an error if an option that is not allowed in the environment is used, such
|
|
|
|
as \fB-p\fR or a script file.
|
|
|
|
|
2016-12-22 06:10:22 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_PATH =\fIpath\fR[:\fI...\fR]
|
|
|
|
\':\'\-separated list of directories prefixed to the module search path.
|
|
|
|
|
2017-03-11 20:18:53 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_PENDING_DEPRECATION = \fI1\fR
|
|
|
|
When set to \fI1\fR, emit pending deprecation warnings.
|
|
|
|
|
2016-02-29 21:49:30 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_REPL_HISTORY =\fIfile\fR
|
2015-09-04 10:48:20 +00:00
|
|
|
Path to the file used to store the persistent REPL history. The default path
|
2016-12-22 06:10:22 +00:00
|
|
|
is \fB~/.node_repl_history\fR, which is overridden by this variable. Setting the
|
2016-02-29 21:49:30 +00:00
|
|
|
value to an empty string ("" or " ") disables persistent REPL history.
|
|
|
|
|
2017-01-25 22:13:34 +00:00
|
|
|
.TP
|
|
|
|
.BR OPENSSL_CONF = \fIfile\fR
|
|
|
|
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
|
|
|
|
\fB./configure \-\-openssl\-fips\fR.
|
|
|
|
|
|
|
|
If the
|
|
|
|
\fB\-\-openssl\-config\fR
|
|
|
|
command line option is used, the environment variable is ignored.
|
|
|
|
|
2016-12-21 10:16:39 +00:00
|
|
|
.TP
|
|
|
|
.BR SSL_CERT_DIR = \fIdir\fR
|
|
|
|
If \fB\-\-use\-openssl\-ca\fR is enabled, this overrides and sets OpenSSL's directory
|
|
|
|
containing trusted certificates.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BR SSL_CERT_FILE = \fIfile\fR
|
|
|
|
If \fB\-\-use\-openssl\-ca\fR is enabled, this overrides and sets OpenSSL's
|
|
|
|
file containing trusted certificates.
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-12-04 18:38:35 +00:00
|
|
|
.TP
|
|
|
|
.BR NODE_REDIRECT_WARNINGS=\fIfile\fR
|
|
|
|
Write process warnings to the given file instead of printing to stderr.
|
|
|
|
(equivalent to using the \-\-redirect\-warnings=\fIfile\fR command-line
|
|
|
|
argument).
|
|
|
|
|
2016-10-08 07:51:28 +00:00
|
|
|
.SH BUGS
|
|
|
|
Bugs are tracked in GitHub Issues:
|
|
|
|
.ur https://github.com/nodejs/node/issues
|
|
|
|
|
|
|
|
|
|
|
|
.SH AUTHORS
|
|
|
|
Written and maintained by 1000+ contributors:
|
|
|
|
.ur https://github.com/nodejs/node/blob/master/AUTHORS
|
|
|
|
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-10-08 07:51:28 +00:00
|
|
|
.SH COPYRIGHT
|
|
|
|
Copyright Node.js contributors. Node.js is available under the MIT license.
|
|
|
|
|
|
|
|
Node.js also includes external libraries that are available under a variety
|
|
|
|
of licenses. See
|
|
|
|
.ur https://github.com/nodejs/node/blob/master/LICENSE
|
|
|
|
for the full license text.
|
|
|
|
|
|
|
|
|
|
|
|
.SH RESOURCES AND DOCUMENTATION
|
2016-07-21 12:12:16 +00:00
|
|
|
Website:
|
|
|
|
.ur https://nodejs.org/
|
2016-02-29 21:49:30 +00:00
|
|
|
|
2016-07-21 12:12:16 +00:00
|
|
|
Documentation:
|
|
|
|
.ur https://nodejs.org/api/
|
2016-02-29 21:49:30 +00:00
|
|
|
|
2016-07-21 12:12:16 +00:00
|
|
|
GitHub repository & Issue Tracker:
|
|
|
|
.ur https://github.com/nodejs/node
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-07-21 12:12:16 +00:00
|
|
|
Mailing list:
|
|
|
|
.ur http://groups.google.com/group/nodejs
|
2014-02-14 19:01:49 +00:00
|
|
|
|
2016-07-21 12:12:16 +00:00
|
|
|
IRC (general questions):
|
|
|
|
.ur "chat.freenode.net #node.js"
|
2016-10-08 07:51:28 +00:00
|
|
|
(unofficial)
|
2015-09-08 20:25:57 +00:00
|
|
|
|
2016-10-08 07:51:28 +00:00
|
|
|
IRC (Node.js core development):
|
2016-07-21 12:12:16 +00:00
|
|
|
.ur "chat.freenode.net #node-dev"
|