Under the window also hands-on try the next, perfect installation, testing through!
1. Download node
To download node in https://nodejs.org/en/, I chose the left stable version
2. Install node
Install the downloaded node in the following diagram step-by-step installation
3. After installation to detect whether the installation node success
After installation, there is a command window at the Window Start button
Detect node version after opening
4. Install Global Express
5. Test Express whether the installation is successful
6.demo Test
1). Create Helloworld.js
var http = require ("http");
Http.createserver (function (request, response) {
Response.writehead ({"Content-type": "Text/plain"});
Response.Write ("Hello World");
Response.End ();
}). Listen (8899);
Console.log ("Nodejs Start listen 8899 port!");
2). Put the helloworld.js in the F:\nodejs\node_modules\npm\test directory
3). Start output
Use the command line to point to the Helloworld.js directory and start Express
7.
Run results
In the browser input http://127.0.0.1:8899, the output results are as follows
Author: l ' Oreal, Paris
The above is the entire content of this article, I hope to help you learn.