Node.js and features introduced

What is 1.node.js

node.js is not a language, but a development platform is based on a JavaScript runtime environment Chrome V8 engine.
What is the development platform: there is a corresponding and specific functions of language api

2.node.js features

Event-driven
2. The non-blocking I / O model
3. single thread
4 has the world's largest open source ecosystem -npm

3.node version

LTS version: long-term support version, namely stable version
Current version: the latest version of
the installation node run under cmd node -v to see node.js installed version
node version .png
if the installation was successful but suggested that node is not an internal or external command. You need to manually configure the environment variables

4. Configure Environment Variables

Why should configuration environment variable: In general, cmd environment you want to run a file, such as node.exe, then there must be a corresponding path under node.exe this file to start, or it will prompt command does not exist.
Configuration environment variable that tells the computer that if we enter the command without a corresponding executable file in the current path, then go down the other path to view, configure the environment variables is to add the absolute path to find an alternative of
how to configure the environment variables:
Right Computer > properties> advanced system settings> advanced> environment variables
System Properties .png
Environment Variables .png
node path .png
select the path variable names, variable values corresponding to each path is a path consisting of a number of ";" remember semicolon separated, when added, where node.js installation is already automatically add environment variables, so there has been a node.js path, and if not, will be added manually

5.node.js coexistence of multiple versions

node.js multiple versions may coexist so long as the installation of a different choice of the installation path. But which version of the entry into force depends on the configuration of environment variables inside, but if you want to replace the version in force, you need to modify environment variables.
Manually modify convenient, nvm can help us to quickly and easily switch version of node.js
1. Install nvm (Node Version Manager)
to download and install nvm (windows version): https://github.com/coreybutler/nvm-windows
nvm install version .png

2. Common commands: cmd window, enter the command

  • nvm v: display nvm version, if the installation was successful.
  • nvm list: list node.js version already installed
  • nvm uninstall the version number: Uninstall the specified version nodejs.
  • nvm install latest: Install the latest version node.js
  • nvm install version: Install the specified version node.js
  • nvm ues version: Use the version specified node.js

Guess you like

Origin www.cnblogs.com/OrochiZ-/p/11648653.html