发展简述 描述:作者 Ryan Dahl 他的工作是用C/C++写高性能Web服务,对于高性能,异步IO、事件驱动是基本原则,但是用C/C++写就太痛苦了。于是这位仁兄开始设想用高级语言开发Web服务。他评估了很多种高级语言,发现很多语言虽然同时提供了同步IO和异步IO,但是开发人员一旦用了同步IO,他们就再也懒得写异步IO了,所以最终Ryan瞄向了JavaScript;
发展简述 描述:作者 Ryan Dahl 他的工作是用C/C++写高性能Web服务,对于高性能,异步IO、事件驱动是基本原则,但是用C/C++写就太痛苦了。于是这位仁兄开始设想用高级语言开发Web服务。他评估了很多种高级语言,发现很多语言虽然同时提供了同步IO和异步IO,但是开发人员一旦用了同步IO,他们就再也懒得写异步IO了,所以最终Ryan瞄向了JavaScript;
# Usage nvm --help Show this message --no-colors Suppress colored output nvm --version Print out the installed version of nvm nvm install [<version>] Download and install a <version>. Uses .nvmrc if available and version is omitted. The following optional arguments, if provided, must appear directly after `nvm install`: -s Skip binary download, install from source only. -b Skip source download, install from binary only. --reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number> --lts When installing, only select from LTS (long-term support) versions --lts=<LTS name> When installing, only select from versions for a specific LTS line --skip-default-packages When installing, skip the default-packages file if it exists --latest-npm After installing, attempt to upgrade to the latest working npm on the given node version --no-progress Disable the progress bar on any downloads --alias=<name> After installing, set the alias specified to the version specified. (same as: nvm alias <name> <version>) --default After installing, set default alias to the version specified. (same as: nvm alias default <version>) nvm uninstall <version> Uninstall a version nvm uninstall --lts Uninstall using automatic LTS (long-term support) alias `lts/*`, if available. nvm uninstall --lts=<LTS name> Uninstall using automatic aliasfor provided LTS line, if available. nvm use [<version>] Modify PATH to use <version>. Uses .nvmrc if available and version is omitted. The following optional arguments, if provided, must appear directly after `nvm use`: --silent Silences stdout/stderr output --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. --lts=<LTS name> Uses automatic aliasfor provided LTS line, if available. nvm exec [<version>] [<command>] Run <command> on <version>. Uses .nvmrc if available and version is omitted. The following optional arguments, if provided, must appear directly after `nvm exec`: --silent Silences stdout/stderr output --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. --lts=<LTS name> Uses automatic aliasfor provided LTS line, if available. nvm run [<version>] [<args>] Run `node` on <version> with <args> as arguments. Uses .nvmrc if available and version is omitted. The following optional arguments, if provided, must appear directly after `nvm run`: --silent Silences stdout/stderr output --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. --lts=<LTS name> Uses automatic aliasfor provided LTS line, if available. nvm current Display currently activated version of Node nvm ls [<version>] List installed versions, matching a given <version> if provided --no-colors Suppress colored output --no-alias Suppress `nvm alias` output nvm ls-remote [<version>] List remote versions available for install, matching a given <version> if provided --lts When listing, only show LTS (long-term support) versions --lts=<LTS name> When listing, only show versions for a specific LTS line --no-colors Suppress colored output nvm version <version> Resolve the given description to a single local version nvm version-remote <version> Resolve the given description to a single remote version --lts When listing, only select from LTS (long-term support) versions --lts=<LTS name> When listing, only select from versions for a specific LTS line nvm deactivate Undo effects of `nvm` on current shell --silent Silences stdout/stderr output nvm alias [<pattern>] Show all aliases beginning with <pattern> --no-colors Suppress colored output nvm alias <name> <version> Set an alias named <name> pointing to <version> nvm unalias <name> Deletes the alias named <name> nvm install-latest-npm Attempt to upgrade to the latest working `npm` on the current node version nvm reinstall-packages <version> Reinstall global `npm` packages contained in <version> to current version nvm unload Unload `nvm` from shell nvm which [current | <version>] Display path to installed node version. Uses .nvmrc if available and version is omitted. --silent Silences stdout/stderr output when a version is omitted nvm cache dir Display path to the cache directory for nvm nvm cache clear Empty cache directory for nvm nvm set-colors [<color codes>] Set five text colors using format "yMeBg". Available when supported. Initial colors are: g b y r e Color codes: r/R = red / bold red g/G = green / bold green b/B = blue / bold blue c/C = cyan / bold cyan m/M = magenta / bold magenta y/Y = yellow / bold yellow k/K = black / bold black e/W = light grey / white
# 切换 node 版本 nvm use 8.0 # Run app.js using node 6.10.3 nvm run 6.10.3 index.js # Run `node app.js` with the PATH pointing to node 4.8.3 nvm exec 4.8.3 node app.js
# 为 node 设置默认版本 # 在shell上设置默认节点版本 nvm alias default 8.1.0 # 始终默认为shell上的最新可用节点版本 nvm alias default node
# Options: - script read from stdin (default if no file name is provided, interactive mode if a tty) -- indicate the end of node options (指示节点结束选项) --abort-on-uncaught-exception aborting instead of exiting causes a core file to be generated for analysis --build-snapshot Generate a snapshot blob when the process exits.Currently only supported in the node_mksnapshot binary. -c, --check syntax check script without executing --completion-bash printsource-able bash completion script -C, --conditions=... additional user conditions for conditional exportsand imports --cpu-prof Start the V8 CPU profiler on start up, and write the CPU profile to disk before exit. If --cpu-prof-dir is not specified, write the profile to the current working directory. --cpu-prof-dir=... Directory where the V8 profiles generated by --cpu-prof will be placed. Does not affect --prof. --cpu-prof-interval=... specified sampling interval in microseconds for theV8 CPU profile generated with --cpu-prof. (default: 1000) --cpu-prof-name=... specified file name of the V8 CPU profile generated with --cpu-prof --diagnostic-dir=... set dir for all output files (default: current working directory) --disable-proto=... disable Object.prototype.__proto__ --disallow-code-generation-from-strings disallow eval and friends --dns-result-order=... set default value of verbatim in dns.lookup. Options are 'ipv4first' (IPv4 addresses are placed before IPv6 addresses) 'verbatim' (addresses are in the order the DNS resolver returned) --enable-fips enable FIPS crypto at startup --enable-source-maps Source Map V3 support for stack traces -e, --eval=... evaluate script --experimental-fetch experimental Fetch API --experimental-global-customevent expose experimental CustomEvent on the global scope --experimental-global-webcrypto expose experimental Web Crypto API on the global scope --experimental-import-meta-resolve experimental ES Module import.meta.resolve() support --loader, --experimental-loader=... use the specified module as a custom loader --experimental-network-imports experimental https: support for the ES Module loader --experimental-policy=... use the specified file as a security policy --es-module-specifier-resolution, --experimental-specifier-resolution=... Select extension resolution algorithm for es modules; either 'explicit' (default) or 'node' --experimental-vm-modules experimental ES Module support in vm module --experimental-wasi-unstable-preview1 experimental WASI support --experimental-wasm-modules experimental ES Module support for webassembly modules --force-context-aware disable loading non-context-aware addons --force-fips force FIPS crypto (cannot be disabled) --force-node-api-uncaught-exceptions-policy enforces 'uncaughtException' event on Node API asynchronous callbacks --frozen-intrinsics experimental frozen intrinsics support --heap-prof Start the V8 heap profiler on start up, and write the heap profile to disk before exit. If --heap-prof-dir is not specified, write the profile to the current working directory. --heap-prof-dir=... Directory where the V8 heap profiles generated by --heap-prof will be placed. --heap-prof-interval=... specified sampling interval in bytes for the V8 heap profile generated with --heap-prof. (default:512 * 1024) --heap-prof-name=... specified file name of the V8 heap profile generated with --heap-prof --heapsnapshot-near-heap-limit=... Generate heap snapshots whenever V8 is approaching the heap limit. No more than the specified number of heap snapshots will be generated. --heapsnapshot-signal=... Generate heap snapshot on specified signal -h, --helpprint node command line options (currently set) --huge-max-old-generation-size increase default maximum heap size on machines with 16GB memory or more --icu-data-dir=... set ICU data load path to dir (overrides NODE_ICU_DATA) (note: linked-in ICU data is present) --input-type=... set module typefor string input --insecure-http-parser use an insecure HTTP parser that accepts invalid HTTP headers --inspect[=[host:]port] activate inspector on host:port (default:127.0.0.1:9229) --inspect-brk[=[host:]port] activate inspector on host:port and break at start of user script --debug-port, --inspect-port=[host:]port set host:port for inspector --inspect-publish-uid=... comma separated list of destinations for inspector uid(default: stderr,http) -i, --interactive always enter the REPL even if stdin does not appear to be a terminal --interpreted-frames-native-stack help system profilers to translate JavaScript interpreted frames --jitless disable runtime allocation of executable memory --max-http-header-size=... set the maximum size of HTTP headers (default:16384 (16KB)) --no-addons disable loading native addons --no-deprecation silence deprecation warnings --no-experimental-repl-await experimental await keyword support in REPL --no-force-async-hooks-checks disable checks for async_hooks --no-global-search-paths disable global module search paths --no-warnings silence all process warnings --node-memory-debug Run with extra debug checks for memory leaks in Node.js itself --openssl-config=... load OpenSSL configuration from the specified file (overrides OPENSSL_CONF) --openssl-shared-config enable OpenSSL shared configuration --pending-deprecation emit pending deprecation warnings --policy-integrity=... ensure the security policy contents match the specified integrity --preserve-symlinks preserve symbolic links when resolving --preserve-symlinks-main preserve symbolic links when resolving the main module -p, --print [...] evaluate script and print result --prof Generate V8 profiler output. --prof-process process V8 profiler output generated using --prof --redirect-warnings=... write warnings to file instead of stderr --report-compact output compact single-line JSON --report-directory, --report-dir=... define custom report pathname. (default: current working directory) --report-filename=... define custom report file name. (default: YYYYMMDD.HHMMSS.PID.SEQUENCE#.txt) --report-on-fatalerror generate diagnostic report on fatal (internal) errors --report-on-signal generate diagnostic report upon receiving signals --report-signal=... causes diagnostic report to be produced on provided signal, unsupported in Windows. (default: SIGUSR2) --report-uncaught-exception generate diagnostic report on uncaught exceptions -r, --require=... module to preload (option can be repeated) --secure-heap=... total size of the OpenSSL secure heap --secure-heap-min=... minimum allocation size from the OpenSSL secure heap --test launch test runner on startup --test-only run tests with 'only' option set --throw-deprecation throw an exception on deprecations --title=... the process title to use on startup --tls-cipher-list=... use an alternative default TLS cipher list --tls-keylog=... log TLS decryption keys to named file for traffic analysis --tls-max-v1.2 set default TLS maximum to TLSv1.2 (default:TLSv1.3) --tls-max-v1.3 set default TLS maximum to TLSv1.3 (default:TLSv1.3) --tls-min-v1.0 set default TLS minimum to TLSv1.0 (default:TLSv1.2) --tls-min-v1.1 set default TLS minimum to TLSv1.1 (default:TLSv1.2) --tls-min-v1.2 set default TLS minimum to TLSv1.2 (default:TLSv1.2) --tls-min-v1.3 set default TLS minimum to TLSv1.3 (default:TLSv1.2) --trace-atomics-wait trace Atomics.wait() operations --trace-deprecation show stack traces on deprecations --trace-event-categories=... comma separated list of trace event categories to record --trace-event-file-pattern=... Template string specifying the filepath for the trace-events data, it supports ${rotation} and ${pid}. --trace-exit show stack trace when an environment exits --trace-sigint enable printing JavaScript stacktrace on SIGINT --trace-sync-io show stack trace when use of sync IO is detected after the first tick --trace-tls prints TLS packet trace information to stderr --trace-uncaught show stack traces for the `throw` behind uncaught exceptions --trace-warnings show stack traces on process warnings --track-heap-objects track heap object allocations for heap snapshots --unhandled-rejections=... define unhandled rejections behavior. Options are 'strict' (always raise an error), 'throw' (raise an error unless 'unhandledRejection' hook is set), 'warn' (log a warning), 'none' (silence warnings), 'warn-with-error-code' (log a warning and setexit code 1 unless 'unhandledRejection' hook is set).(default: throw) --use-bundled-ca use bundled CA store (default) --use-largepages=... Map the Node.js static code to large pages. Options are 'off' (the default value, meaning do not map), 'on' (map and ignore failure, reporting it tostderr), or 'silent' (map and silently ignore failure) --use-openssl-ca use OpenSSL's default CA store --v8-options print V8 command line options --v8-pool-size=... set V8's thread pool size --zero-fill-buffers automatically zero-fill all newly allocated Buffer and SlowBuffer instances -v, --version print Node.js version
# Environment variables: FORCE_COLOR when set to 'true', 1, 2, 3, or an empty stringcauses NO_COLOR and NODE_DISABLE_COLORS to beignored. (当设置为"true"时,1、2、3或空字符串会导致忽略`NO_COLOR`和`NODE_DISABLE_COLORS`) NO_COLOR Alias for NODE_DISABLE_COLORS NODE_DEBUG ','-separated list of core modules that should print debug information (应打印调试信息的核心模块的单独列表) NODE_DEBUG_NATIVE ','-separated list of C++ core debug categories that should print debug output (应打印调试输出的C++核心调试类别的分隔列表) NODE_DISABLE_COLORS set to 1 to disable colors in the REPL (设置为1可禁用REPL中的颜色) NODE_EXTRA_CA_CERTS path to additional CA certificates file. Only read once during process startup. (其他CA证书文件的路径。在进程启动期间只读取一次。) NODE_NO_WARNINGS set to 1 to silence process warnings (设置为1以使进程警告静音) NODE_PATH ':'-separated list of directories prefixed to the module search path (":"-以模块搜索路径为前缀的目录分隔列表) NODE_PENDING_DEPRECATION set to 1 to emit pending deprecation warnings (设置为1将发出挂起的弃用警告) NODE_PENDING_PIPE_INSTANCES set the number of pending pipe instance handles on Windows (设置Windows上挂起的管道实例句柄数) NODE_PRESERVE_SYMLINKS set to 1 to preserve symbolic links when resolving and caching modules (设置为1可在解析和缓存模块时保留符号链接) NODE_REDIRECT_WARNINGS write warnings to path instead of stderr (将警告写入路径而不是stderr) NODE_REPL_HISTORY path to the persistent REPL history file (永久REPL历史记录文件的路径) NODE_TLS_REJECT_UNAUTHORIZED set to 0 to disable TLS certificate validation (0以禁用TLS证书验证) NODE_V8_COVERAGE directory to output v8 coverage JSON to (将v8覆盖率JSON输出到的目录) UV_THREADPOOL_SIZE sets the number of threads used in libuv's threadpool (设置libuv线程池中使用的线程数)
方式1.请访问本博主的B站【WeiyiGeek】首页关注UP主, 将自动随机获取解锁验证码。
Method 2.Please visit 【My Twitter】. There is an article verification code in the homepage.
方式3.扫一扫下方二维码,关注本站官方公众号
回复:验证码
将获取解锁(有效期7天)本站所有技术文章哟!