Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 4642cf16cdfb16e1cdaefd0999c41911 > files > 29

nodejs-docs-6.17.1-8.mga6.noarch.rpm

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Command Line Options | Node.js v6.17.1 Documentation</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
  <link rel="stylesheet" href="assets/style.css">
  <link rel="stylesheet" href="assets/sh.css">
  <link rel="canonical" href="https://nodejs.org/api/cli.html">
</head>
<body class="alt apidoc" id="api-section-cli">
  <div id="content" class="clearfix">
    <div id="column2" class="interior">
      <div id="intro" class="interior">
        <a href="/" title="Go back to the home page">
          Node.js
        </a>
      </div>
      <ul>
<li><a class="nav-documentation" href="documentation.html">About these Docs</a></li>
<li><a class="nav-synopsis" href="synopsis.html">Usage &amp; Example</a></li>
</ul>
<div class="line"></div>

<ul>
<li><a class="nav-assert" href="assert.html">Assertion Testing</a></li>
<li><a class="nav-buffer" href="buffer.html">Buffer</a></li>
<li><a class="nav-addons" href="addons.html">C++ Addons</a></li>
<li><a class="nav-n-api" href="n-api.html">C/C++ Addons - N-API</a></li>
<li><a class="nav-child_process" href="child_process.html">Child Processes</a></li>
<li><a class="nav-cluster" href="cluster.html">Cluster</a></li>
<li><a class="nav-cli active" href="cli.html">Command Line Options</a></li>
<li><a class="nav-console" href="console.html">Console</a></li>
<li><a class="nav-crypto" href="crypto.html">Crypto</a></li>
<li><a class="nav-debugger" href="debugger.html">Debugger</a></li>
<li><a class="nav-dns" href="dns.html">DNS</a></li>
<li><a class="nav-domain" href="domain.html">Domain</a></li>
<li><a class="nav-errors" href="errors.html">Errors</a></li>
<li><a class="nav-events" href="events.html">Events</a></li>
<li><a class="nav-fs" href="fs.html">File System</a></li>
<li><a class="nav-globals" href="globals.html">Globals</a></li>
<li><a class="nav-http" href="http.html">HTTP</a></li>
<li><a class="nav-https" href="https.html">HTTPS</a></li>
<li><a class="nav-intl" href="intl.html">Internationalization</a></li>
<li><a class="nav-modules" href="modules.html">Modules</a></li>
<li><a class="nav-net" href="net.html">Net</a></li>
<li><a class="nav-os" href="os.html">OS</a></li>
<li><a class="nav-path" href="path.html">Path</a></li>
<li><a class="nav-process" href="process.html">Process</a></li>
<li><a class="nav-punycode" href="punycode.html">Punycode</a></li>
<li><a class="nav-querystring" href="querystring.html">Query Strings</a></li>
<li><a class="nav-readline" href="readline.html">Readline</a></li>
<li><a class="nav-repl" href="repl.html">REPL</a></li>
<li><a class="nav-stream" href="stream.html">Stream</a></li>
<li><a class="nav-string_decoder" href="string_decoder.html">String Decoder</a></li>
<li><a class="nav-timers" href="timers.html">Timers</a></li>
<li><a class="nav-tls" href="tls.html">TLS/SSL</a></li>
<li><a class="nav-tty" href="tty.html">TTY</a></li>
<li><a class="nav-dgram" href="dgram.html">UDP/Datagram</a></li>
<li><a class="nav-url" href="url.html">URL</a></li>
<li><a class="nav-util" href="util.html">Utilities</a></li>
<li><a class="nav-v8" href="v8.html">V8</a></li>
<li><a class="nav-vm" href="vm.html">VM</a></li>
<li><a class="nav-zlib" href="zlib.html">ZLIB</a></li>
</ul>
<div class="line"></div>

<ul>
<li><a class="nav-https-github-com-nodejs-node" href="https://github.com/nodejs/node">GitHub Repo &amp; Issue Tracker</a></li>
<li><a class="nav-http-groups-google-com-group-nodejs" href="http://groups.google.com/group/nodejs">Mailing List</a></li>
</ul>

    </div>

    <div id="column1" data-id="cli" class="interior">
      <header>
        <h1>Node.js v6.17.1 Documentation</h1>
        <div id="gtoc">
          <ul>
            <li>
              <a href="index.html" name="toc">Index</a>
            </li>
            <li>
              <a href="all.html">View on single page</a>
            </li>
            <li>
              <a href="cli.json">View as JSON</a>
            </li>
            
    <li class="version-picker">
      <a href="#">View another version <span>&#x25bc;</span></a>
      <ol class="version-picker"><li><a href="https://nodejs.org/docs/latest-v9.x/api/cli.html">9.x</a></li>
<li><a href="https://nodejs.org/docs/latest-v8.x/api/cli.html">8.x <b>LTS</b></a></li>
<li><a href="https://nodejs.org/docs/latest-v7.x/api/cli.html">7.x</a></li>
<li><a href="https://nodejs.org/docs/latest-v6.x/api/cli.html">6.x <b>LTS</b></a></li></ol>
    </li>
  
          </ul>
        </div>
        <hr>
      </header>

      <div id="toc">
        <h2>Table of Contents</h2>
        <ul>
<li><span class="stability_undefined"><a href="#cli_command_line_options">Command Line Options</a></span><ul>
<li><span class="stability_undefined"><a href="#cli_synopsis">Synopsis</a></span></li>
<li><span class="stability_undefined"><a href="#cli_options">Options</a></span><ul>
<li><span class="stability_undefined"><a href="#cli_v_version"><code>-v</code>, <code>--version</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_h_help"><code>-h</code>, <code>--help</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_e_eval_script"><code>-e</code>, <code>--eval &quot;script&quot;</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_p_print_script"><code>-p</code>, <code>--print &quot;script&quot;</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_c_check"><code>-c</code>, <code>--check</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_i_interactive"><code>-i</code>, <code>--interactive</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_r_require_module"><code>-r</code>, <code>--require module</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_no_deprecation"><code>--no-deprecation</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_trace_deprecation"><code>--trace-deprecation</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_throw_deprecation"><code>--throw-deprecation</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_no_warnings"><code>--no-warnings</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_trace_warnings"><code>--trace-warnings</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_redirect_warnings_file"><code>--redirect-warnings=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_trace_sync_io"><code>--trace-sync-io</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_zero_fill_buffers"><code>--zero-fill-buffers</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_preserve_symlinks"><code>--preserve-symlinks</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_track_heap_objects"><code>--track-heap-objects</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_prof_process"><code>--prof-process</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_v8_options"><code>--v8-options</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_tls_cipher_list_list"><code>--tls-cipher-list=list</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_enable_fips"><code>--enable-fips</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_force_fips"><code>--force-fips</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_openssl_config_file"><code>--openssl-config=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_use_openssl_ca_use_bundled_ca"><code>--use-openssl-ca</code>, <code>--use-bundled-ca</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_icu_data_dir_file"><code>--icu-data-dir=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli"><code>--</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_max_http_header_size_size"><code>--max-http-header-size=size</code></a></span></li>
</ul>
</li>
<li><span class="stability_undefined"><a href="#cli_environment_variables">Environment Variables</a></span><ul>
<li><span class="stability_undefined"><a href="#cli_node_debug_module"><code>NODE_DEBUG=module[,…]</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_path_path"><code>NODE_PATH=path[:…]</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_disable_colors_1"><code>NODE_DISABLE_COLORS=1</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_icu_data_file"><code>NODE_ICU_DATA=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_no_warnings_1"><code>NODE_NO_WARNINGS=1</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_options_options"><code>NODE_OPTIONS=options...</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_repl_history_file"><code>NODE_REPL_HISTORY=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_tty_unsafe_async_1"><code>NODE_TTY_UNSAFE_ASYNC=1</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_extra_ca_certs_file"><code>NODE_EXTRA_CA_CERTS=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_openssl_conf_file"><code>OPENSSL_CONF=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_ssl_cert_dir_dir"><code>SSL_CERT_DIR=dir</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_ssl_cert_file_file"><code>SSL_CERT_FILE=file</code></a></span></li>
<li><span class="stability_undefined"><a href="#cli_node_redirect_warnings_file"><code>NODE_REDIRECT_WARNINGS=file</code></a></span></li>
</ul>
</li>
</ul>
</li>
</ul>

      </div>

      <div id="apicontent">
        <h1>Command Line Options<span><a class="mark" href="#cli_command_line_options"id="cli_command_line_options">#</a></span></h1>
<!--introduced_in=v5.9.1-->
<!--type=misc-->
<p>Node.js comes with a variety of CLI options. These options expose built-in
debugging, multiple ways to execute scripts, and other helpful runtime options.</p>
<p>To view this documentation as a manual page in your terminal, run <code>man node</code>.</p>
<h2>Synopsis<span><a class="mark" href="#cli_synopsis"id="cli_synopsis">#</a></span></h2>
<p><code>node [options] [v8 options] [script.js | -e &quot;script&quot;] [--] [arguments]</code></p>
<p><code>node debug [script.js | -e &quot;script&quot; | &lt;host&gt;:&lt;port&gt;] …</code></p>
<p><code>node --v8-options</code></p>
<p>Execute without arguments to start the <a href="repl.html">REPL</a>.</p>
<p><em>For more info about <code>node debug</code>, please see the <a href="debugger.html">debugger</a> documentation.</em></p>
<h2>Options<span><a class="mark" href="#cli_options"id="cli_options">#</a></span></h2>
<h3><code>-v</code>, <code>--version</code><span><a class="mark" href="#cli_v_version"id="cli_v_version">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.1.3</span>
</div><p>Print node&#39;s version.</p>
<h3><code>-h</code>, <code>--help</code><span><a class="mark" href="#cli_h_help"id="cli_h_help">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.1.3</span>
</div><p>Print node command line options.
The output of this option is less detailed than this document.</p>
<h3><code>-e</code>, <code>--eval &quot;script&quot;</code><span><a class="mark" href="#cli_e_eval_script"id="cli_e_eval_script">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.5.2</span>
</div><p>Evaluate the following argument as JavaScript. The modules which are
predefined in the REPL can also be used in <code>script</code>.</p>
<p><em>Note</em>: On Windows, using <code>cmd.exe</code> a single quote will not work correctly
because it only recognizes double <code>&quot;</code> for quoting. In Powershell or
Git bash, both <code>&#39;</code> and <code>&quot;</code> are usable.</p>
<h3><code>-p</code>, <code>--print &quot;script&quot;</code><span><a class="mark" href="#cli_p_print_script"id="cli_p_print_script">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.6.4</span>
</div><p>Identical to <code>-e</code> but prints the result.</p>
<h3><code>-c</code>, <code>--check</code><span><a class="mark" href="#cli_c_check"id="cli_c_check">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v5.0.0</span>
</div><p>Syntax check the script without executing.</p>
<h3><code>-i</code>, <code>--interactive</code><span><a class="mark" href="#cli_i_interactive"id="cli_i_interactive">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.7.7</span>
</div><p>Opens the REPL even if stdin does not appear to be a terminal.</p>
<h3><code>-r</code>, <code>--require module</code><span><a class="mark" href="#cli_r_require_module"id="cli_r_require_module">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v1.6.0</span>
</div><p>Preload the specified module at startup.</p>
<p>Follows <code>require()</code>&#39;s module resolution
rules. <code>module</code> may be either a path to a file, or a node module name.</p>
<h3><code>--no-deprecation</code><span><a class="mark" href="#cli_no_deprecation"id="cli_no_deprecation">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.8.0</span>
</div><p>Silence deprecation warnings.</p>
<h3><code>--trace-deprecation</code><span><a class="mark" href="#cli_trace_deprecation"id="cli_trace_deprecation">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.8.0</span>
</div><p>Print stack traces for deprecations.</p>
<h3><code>--throw-deprecation</code><span><a class="mark" href="#cli_throw_deprecation"id="cli_throw_deprecation">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.11.14</span>
</div><p>Throw errors for deprecations.</p>
<h3><code>--no-warnings</code><span><a class="mark" href="#cli_no_warnings"id="cli_no_warnings">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Silence all process warnings (including deprecations).</p>
<h3><code>--trace-warnings</code><span><a class="mark" href="#cli_trace_warnings"id="cli_trace_warnings">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Print stack traces for process warnings (including deprecations).</p>
<h3><code>--redirect-warnings=file</code><span><a class="mark" href="#cli_redirect_warnings_file"id="cli_redirect_warnings_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.12.0</span>
</div><p>Write process warnings to the given file instead of printing to stderr. The
file will be created if it does not exist, and will be appended to if it does.
If an error occurs while attempting to write the warning to the file, the
warning will be written to stderr instead.</p>
<h3><code>--trace-sync-io</code><span><a class="mark" href="#cli_trace_sync_io"id="cli_trace_sync_io">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v2.1.0</span>
</div><p>Prints a stack trace whenever synchronous I/O is detected after the first turn
of the event loop.</p>
<h3><code>--zero-fill-buffers</code><span><a class="mark" href="#cli_zero_fill_buffers"id="cli_zero_fill_buffers">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Automatically zero-fills all newly allocated <a href="buffer.html#buffer_buffer">Buffer</a> and <a href="buffer.html#buffer_class_slowbuffer">SlowBuffer</a>
instances.</p>
<h3><code>--preserve-symlinks</code><span><a class="mark" href="#cli_preserve_symlinks"id="cli_preserve_symlinks">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.3.0</span>
</div><p>Instructs the module loader to preserve symbolic links when resolving and
caching modules.</p>
<p>By default, when Node.js loads a module from a path that is symbolically linked
to a different on-disk location, Node.js will dereference the link and use the
actual on-disk &quot;real path&quot; of the module as both an identifier and as a root
path to locate other dependency modules. In most cases, this default behavior
is acceptable. However, when using symbolically linked peer dependencies, as
illustrated in the example below, the default behavior causes an exception to
be thrown if <code>moduleA</code> attempts to require <code>moduleB</code> as a peer dependency:</p>
<pre><code class="lang-text">{appDir}
 ├── app
 │   ├── index.js
 │   └── node_modules
 │       ├── moduleA -&gt; {appDir}/moduleA
 │       └── moduleB
 │           ├── index.js
 │           └── package.json
 └── moduleA
     ├── index.js
     └── package.json
</code></pre>
<p>The <code>--preserve-symlinks</code> command line flag instructs Node.js to use the
symlink path for modules as opposed to the real path, allowing symbolically
linked peer dependencies to be found.</p>
<p>Note, however, that using <code>--preserve-symlinks</code> can have other side effects.
Specifically, symbolically linked <em>native</em> modules can fail to load if those
are linked from more than one location in the dependency tree (Node.js would
see those as two separate modules and would attempt to load the module multiple
times, causing an exception to be thrown).</p>
<h3><code>--track-heap-objects</code><span><a class="mark" href="#cli_track_heap_objects"id="cli_track_heap_objects">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v2.4.0</span>
</div><p>Track heap object allocations for heap snapshots.</p>
<h3><code>--prof-process</code><span><a class="mark" href="#cli_prof_process"id="cli_prof_process">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Process v8 profiler output generated using the v8 option <code>--prof</code>.</p>
<h3><code>--v8-options</code><span><a class="mark" href="#cli_v8_options"id="cli_v8_options">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.1.3</span>
</div><p>Print v8 command line options.</p>
<p>Note: v8 options allow words to be separated by both dashes (<code>-</code>) or underscores
(<code>_</code>).</p>
<p>For example, <code>--stack-trace-limit</code> is equivalent to <code>--stack_trace_limit</code>.</p>
<h3><code>--tls-cipher-list=list</code><span><a class="mark" href="#cli_tls_cipher_list_list"id="cli_tls_cipher_list_list">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v4.0.0</span>
</div><p>Specify an alternative default TLS cipher list. (Requires Node.js to be built
with crypto support. (Default))</p>
<h3><code>--enable-fips</code><span><a class="mark" href="#cli_enable_fips"id="cli_enable_fips">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
<code>./configure --openssl-fips</code>)</p>
<h3><code>--force-fips</code><span><a class="mark" href="#cli_force_fips"id="cli_force_fips">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.0.0</span>
</div><p>Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
(Same requirements as <code>--enable-fips</code>)</p>
<h3><code>--openssl-config=file</code><span><a class="mark" href="#cli_openssl_config_file"id="cli_openssl_config_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.9.0</span>
</div><p>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
<code>./configure --openssl-fips</code>.</p>
<h3><code>--use-openssl-ca</code>, <code>--use-bundled-ca</code><span><a class="mark" href="#cli_use_openssl_ca_use_bundled_ca"id="cli_use_openssl_ca_use_bundled_ca">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.11.0</span>
</div><p>Use OpenSSL&#39;s default CA store or use bundled Mozilla CA store as supplied by
current Node.js version. The default store is selectable at build-time.</p>
<p>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.</p>
<p>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.</p>
<p>See <code>SSL_CERT_DIR</code> and <code>SSL_CERT_FILE</code>.</p>
<h3><code>--icu-data-dir=file</code><span><a class="mark" href="#cli_icu_data_dir_file"id="cli_icu_data_dir_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.11.15</span>
</div><p>Specify ICU data load path. (overrides <code>NODE_ICU_DATA</code>)</p>
<h3><code>--</code><span><a class="mark" href="#cli"id="cli">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.11.0</span>
</div><p>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.</p>
<h3><code>--max-http-header-size=size</code><span><a class="mark" href="#cli_max_http_header_size_size"id="cli_max_http_header_size_size">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.16.0</span>
</div><p>Specify the maximum size, in bytes, of HTTP headers. Defaults to 8KB.</p>
<h2>Environment Variables<span><a class="mark" href="#cli_environment_variables"id="cli_environment_variables">#</a></span></h2>
<h3><code>NODE_DEBUG=module[,…]</code><span><a class="mark" href="#cli_node_debug_module"id="cli_node_debug_module">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.1.32</span>
</div><p><code>&#39;,&#39;</code>-separated list of core modules that should print debug information.</p>
<h3><code>NODE_PATH=path[:…]</code><span><a class="mark" href="#cli_node_path_path"id="cli_node_path_path">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.1.32</span>
</div><p><code>&#39;:&#39;</code>-separated list of directories prefixed to the module search path.</p>
<p><em>Note: on Windows, this is a <code>&#39;;&#39;</code>-separated list instead.</em></p>
<h3><code>NODE_DISABLE_COLORS=1</code><span><a class="mark" href="#cli_node_disable_colors_1"id="cli_node_disable_colors_1">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.3.0</span>
</div><p>When set to <code>1</code> colors will not be used in the REPL.</p>
<h3><code>NODE_ICU_DATA=file</code><span><a class="mark" href="#cli_node_icu_data_file"id="cli_node_icu_data_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v0.11.15</span>
</div><p>Data path for ICU (Intl object) data. Will extend linked-in data when compiled
with small-icu support.</p>
<h3><code>NODE_NO_WARNINGS=1</code><span><a class="mark" href="#cli_node_no_warnings_1"id="cli_node_no_warnings_1">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.11.0</span>
</div><p>When set to <code>1</code>, process warnings are silenced.</p>
<h3><code>NODE_OPTIONS=options...</code><span><a class="mark" href="#cli_node_options_options"id="cli_node_options_options">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.12.0</span>
</div><p><code>options...</code> are interpreted as if they had been specified on the command line
before the actual command line (so they can be overriden). Node will exit with
an error if an option that is not allowed in the environment is used, such as
<code>-p</code> or a script file.</p>
<p>Node options that are allowed are:</p>
<ul>
<li><code>--enable-fips</code></li>
<li><code>--force-fips</code></li>
<li><code>--icu-data-dir</code></li>
<li><code>--debug-brk</code></li>
<li><code>--debug-port</code></li>
<li><code>--debug</code></li>
<li><code>--max-http-header-size</code></li>
<li><code>--no-deprecation</code></li>
<li><code>--no-warnings</code></li>
<li><code>--openssl-config</code></li>
<li><code>--redirect-warnings</code></li>
<li><code>--require</code>, <code>-r</code></li>
<li><code>--throw-deprecation</code></li>
<li><code>--tls-cipher-list</code></li>
<li><code>--trace-deprecation</code></li>
<li><code>--trace-sync-io</code></li>
<li><code>--trace-warnings</code></li>
<li><code>--track-heap-objects</code></li>
<li><code>--use-bundled-ca</code></li>
<li><code>--use-openssl-ca</code></li>
<li><code>--v8-pool-size</code></li>
<li><code>--zero-fill-buffers</code></li>
</ul>
<p>V8 options that are allowed are:</p>
<ul>
<li><code>--abort-on-uncaught-exception</code></li>
<li><code>--max-old-space-size</code></li>
</ul>
<h3><code>NODE_REPL_HISTORY=file</code><span><a class="mark" href="#cli_node_repl_history_file"id="cli_node_repl_history_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v3.0.0</span>
</div><p>Path to the file used to store the persistent REPL history. The default path is
<code>~/.node_repl_history</code>, which is overridden by this variable. Setting the value
to an empty string (<code>&#39;&#39;</code> or <code>&#39; &#39;</code>) disables persistent REPL history.</p>
<h3><code>NODE_TTY_UNSAFE_ASYNC=1</code><span><a class="mark" href="#cli_node_tty_unsafe_async_1"id="cli_node_tty_unsafe_async_1">#</a></span></h3>
<div class="api_metadata">
<span>Added in: 6.4.0</span>
</div><p>When set to <code>1</code>, writes to <code>stdout</code> and <code>stderr</code> will be non-blocking and
asynchronous when outputting to a TTY on platforms which support async stdio.
Setting this will void any guarantee that stdio will not be interleaved or
dropped at program exit. <strong>Use of this mode is not recommended.</strong></p>
<h3><code>NODE_EXTRA_CA_CERTS=file</code><span><a class="mark" href="#cli_node_extra_ca_certs_file"id="cli_node_extra_ca_certs_file">#</a></span></h3>
<p>When set, the well known &quot;root&quot; CAs (like VeriSign) will be extended with the
extra certificates in <code>file</code>. The file should consist of one or more trusted
certificates in PEM format. A message will be emitted (once) with
<a href="process.html#process_process_emitwarning_warning_name_ctor"><code>process.emitWarning()</code></a> if the file is missing or
malformed, but any errors are otherwise ignored.</p>
<p>Note that neither the well known nor extra certificates are used when the <code>ca</code>
options property is explicitly specified for a TLS or HTTPS client or server.</p>
<h3><code>OPENSSL_CONF=file</code><span><a class="mark" href="#cli_openssl_conf_file"id="cli_openssl_conf_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.11.0</span>
</div><p>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 <code>./configure
--openssl-fips</code>.</p>
<p>If the <a href="#cli_openssl_config_file"><code>--openssl-config</code></a> command line option is used, the environment
variable is ignored.</p>
<h3><code>SSL_CERT_DIR=dir</code><span><a class="mark" href="#cli_ssl_cert_dir_dir"id="cli_ssl_cert_dir_dir">#</a></span></h3>
<p>If <code>--use-openssl-ca</code> is enabled, this overrides and sets OpenSSL&#39;s directory
containing trusted certificates.</p>
<p>Note: Be aware that unless the child environment is explicitly set, this
evironment variable will be inherited by any child processes, and if they use
OpenSSL, it may cause them to trust the same CAs as node.</p>
<h3><code>SSL_CERT_FILE=file</code><span><a class="mark" href="#cli_ssl_cert_file_file"id="cli_ssl_cert_file_file">#</a></span></h3>
<p>If <code>--use-openssl-ca</code> is enabled, this overrides and sets OpenSSL&#39;s file
containing trusted certificates.</p>
<p>Note: Be aware that unless the child environment is explicitly set, this
evironment variable will be inherited by any child processes, and if they use
OpenSSL, it may cause them to trust the same CAs as node.</p>
<h3><code>NODE_REDIRECT_WARNINGS=file</code><span><a class="mark" href="#cli_node_redirect_warnings_file"id="cli_node_redirect_warnings_file">#</a></span></h3>
<div class="api_metadata">
<span>Added in: v6.12.0</span>
</div><p>When set, process warnings will be emitted to the given file instead of
printing to stderr. The file will be created if it does not exist, and will be
appended to if it does. If an error occurs while attempting to write the
warning to the file, the warning will be written to stderr instead. This is
equivalent to using the <code>--redirect-warnings=file</code> command-line flag.</p>

      </div>
    </div>
  </div>
  <script src="assets/sh_main.js"></script>
  <script src="assets/sh_javascript.min.js"></script>
  <script>highlight(undefined, undefined, 'pre');</script>
  <!-- __TRACKING__ -->
</body>
</html>