First is the installation, the installation is very simple, download an MSI file after the next step, no difficulty
And then the first Hello World test file
var http = require (' http '); Http.createserver (function (request, response) {//Send HTTP Header//HTTP status value: 200:ok//Content Type: Tex T/plainresponse.writehead ($, {' Content-type ': ' Text/plain '});//Send response data "Hello World" response.end (' Hello world\n ');}). Listen (8888);//terminal print the following information Console.log (' Server running at http://127.0.0.1:8888/');
Then cmd opens the control window, locates the root path of the file and compiles it, for example, this is the path of my file, so enter this in the controller.
C:\Program Files\nodejs>node Server.jsserver running at http://127.0.0.1:8888/
and then browser input
http://127.0.0.1:8888/
will be able to win "Hello World"
Nodejs Server-side scripting