之前搞過一段時間的node,幾個月不用,又忘記了...T_T;html
準備從新學一下,再作幾個項目.如今Node的版本是0.10.12,下載地址是http://nodejs.org;node
在cmd裏服務器
個人node裝在E盤:
-> e:
-> cd node
-> node xxx.js
//先搭建一個http服務器ui
var http = require('http');
http.createServer(function(req,res){
res.writeHead(200,'text/html'); //響應頭
res.write('<p>Hello Node</p>'); //響應內容
res.end(); //響應結束
}).listen(3000)
console.log('http server is listening at 3000 port');
...時間緣由沒完結spa