Well, it took some time for the first contact with Nodejs in 2017 to finally run Hello World right out.
Let me tell you the details below:
The first step: Needless to say, in https://nodejs.org/en/download a new stable version of Nodejs (generally the left is the stable version).
The second step, it is installed, has been next on the good.
The third step: installed, you can open the node interface, test it.
Fourth step: I will steal the lazy, directly from the official website to copy the test code, for testing.
Fifth step, open the server.
Sixth step: Enter http://127.0.0.1:1337 or http://localhost:1337 in the browser to run the Hello.js file.
The results are as follows:
In addition, sometimes there is a small problem. When you first touch, you can enter the node command to eject the node command instead of an internal or external command. In general, this is due to the fact that the environment variable is not modified. We just need to simply modify the environment variables. Just change the value of path to the address you installed.
I had to nodejs the first Test, and it was a complete success. What about you, my dear friends. Come on, everybody!
First contact with Nodejs