node. JS installation (Love front end)

Source: Internet
Author: User

Only a real installation of node will know what node. js is.

node. JS can be installed on any operating system, the underlying is the Chrome V8 engine, why before the Chrome browser parsing JS quickly, because

The Chrome browser is a V8 engine, written in C + +.

Enter the official website http:nodejs.org,

LTS is the latest stable version, current is the newest version

Then there are three ways to install: Windows MAC (Mike) Linux, which is installed in two different ways

One is the MSI installation package version, one is the. zip package version, which will then be configured on Linux, we will first download this,

After I enter the official website to download directly, then the installation path cannot have the Chinese path, for example in the configuration environment variable, if has the Chinese to be very troublesome.

We installed the MSI format of the installation package, it is Microsoft Installer, Microsoft Installer this is a format

Then next, the next step is to install, and now node. JS has been successfully installed

How can you prove that you have installed it now?

We need to open the CMD command-line window of the system, and CMD is the shorthand for Commond, which indicates the command. Linux-like, DOS systems

Use commands in the operating system for such a tool.

Enter Node-v, you can view the current version number, at this time the input command, node-v, ==$ node-v. $ indicates that the normal user # represents the highest administrator, we will later learn in the Linux system, $ means normal permissions can be run.

Note the installation path cannot have Chinese, all settings do not change,

Now let's look at why we can enter the node command.

Now, let's measure it. What are environment variables

All systems have a global environment variable

has been automatically configured, very smart, today, node. JS has helped us configure.

MSI installation has been set up for us automatically, when the environment variable is deleted, the node command will not be used.

Note the $ symbol is a representation of a normal user in the command line of a Linux system.

The system environment variable allows us to open the specified file directly on any disk.

Below we use node to run a JS file

Node followed by a space followed by a file path,

You can drag and drop the file, drag the file directly to the file path can appear

Let's have a good head today!

Which means you want to run who is node,

Now with the absolute path, if you don't want to be so troublesome, you can use the CD to toggle the cursor position

C:\Users\Danny is the cursor position, so now the 1.js is an absolute road strength

or use a CD to find his father, then open 1.js. The path of the system's drive letter has changed, this address is relative address,

Our slogan is:
Who wants to run the node who's

Node environment than browser, browser must use HTML to open JS, and node is not.

At this point you have the second JS runtime environment, the first one is the browser, the second is a node

At this point we prove that Nodejs is a JavaScript runtime environment.

Next lesson we're going to learn the philosophy of node. js

node. JS installation (Love front end)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.