I want to say something about configuring node. js in a Windows environment ...
First step: Download the installation file
: Official website http://www.nodejs.org/,Select the appropriate installation package according to your computer's configuration.
Step Two: Install node. jsAfter the download is complete, double-click the image file to follow the next step, the next boot, the middle can change the installation path, the final installation successful interface is: After successful installation, in "Command Prompt" input: Node-v view the installation version, the output version is installed successfully
Step Two: Test the installed node. JSCreate a new folder in the D drive Nodepro inside a new file hello.js, inside a line of code
Go to the command line console, go to the new folder in front of you, and enter note hello.js
Results of the output
The console outputs "Hello, Nodejs."
Iv. Web version of HelloWorld
Create a new http.js in the above directory with the following code
var http = require ("http"); Http.createserver (function(request, Response) { Response.writehead ($, {"Content-type": "Text/html"}); Response.Write ("Hello world!" ); Response.End ();}). Listen (
Start the service on the command line and tap node Http.js
Then open the browser address bar input http://localhost:8000/, see the page output Hello world! It was a success.
Congratulations on starting the World of node. js.
Home: http://nodejs.org/
English api:http://nodejs.org/api/(latest)
Chinese api:http://nodeapi.ucdok.com/#/api/
Nodejs Getting Started