Introduction to node. js
The Wikipedia introduction to node. js Http://baike.baidu.com/view/3974030.htm?fromtitle=nodejs&type=syn
node. JS Installation
This is the website of node. JS http://www.nodejs.org
The author's operating system is Win7 64bit. Direct selection of an installable MSI file for download and installation
Once the installation is complete, set the environment variable so that we can access the node program directly in command line mode.
The first program of node. js
Create a test.js file on the desktop, edit it, and the code is as follows:
var http = require (' http '); Http.createserver (function (req, res) { res.writehead (200,{' content-type ': ' text/html ') }); Res.write ('
Then open the command line terminal, the following way to run this JS file
Finally, open the browser, enter 127.0.0.1:8080 in the Address bar, the following page appears
OK, it's a success. Simple, huh?!
here is [email protected], welcome to Exchange.
I original works, reproduced please indicate the source.