标签:style blog http java 文件 art
第1步:下载、安装文件
打开nodejs的官网http://www.nodejs.org/download/ ,选择需要的版本,直接打开,默认安装即可
第二步:编写测试代码:
var http = require('http');
http.createServer(function(req, res) {
res.writeHead(200, {
'Content-Type': 'text/plain'
});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');进入到node的安装目录执行
node hello.js
Server running at http://127.0.0.1:1337/
参考:http://www.cnblogs.com/beiyuu/archive/2011/07/29/install-nodejs.html
http://blog.csdn.net/freshlover/article/details/12691031
标签:style blog http java 文件 art
原文地址:http://blog.csdn.net/joeyon1985/article/details/37922589