Chapter 1 NodeJS start
1.1 download and install
- Download https://nodejs.org/zh-cn/download/
- Version history: https: //nodejs.org/en/download/releases/
windows under the installation process:
For've already installed, re-install will upgrade
After successful installation, open a command line, enter
-v --version node or node (node display version number)
It represents a successful installation
Other platform installation:
https://nodejs.org/zh-cn/download/package-manager/
1.2 REPL environment
node in the REPL environment similar to the browser Console console, you can do some test code.
Press ctrl + c twice to exit the REPL environment
However, the code we write is certainly not written in the console, but to write in a separate .js file.
1.3 node running js code
The module 1.4 Node
The browser (client) in the Node JS in JS