Getting the front foundation -Node.js

Chapter 1 NodeJS start

1.1 download and install

  • Download https://nodejs.org/zh-cn/download/
  • Version history: https: //nodejs.org/en/download/releases/

Here Insert Picture Description

windows under the installation process:

Here Insert Picture Description

Here Insert Picture Description

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)

Here Insert Picture Description

It represents a successful installation

Other platform installation:

https://nodejs.org/zh-cn/download/package-manager/

1.2 REPL environment

Here Insert Picture Description

Here Insert Picture Description

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

Here Insert Picture Description

Here Insert Picture Description

Here Insert Picture Description

The module 1.4 Node

The browser (client) in the Node JS in JS

Here Insert Picture Description

Released 1807 original articles · won praise 1929 · Views 170,000 +

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/105117376