目录
①下载
②安装
安装包下载之后是一个后缀为msi的安装文件
双击后一路next
③修改环境变量
右击“我的电脑”->属性->更改设置
新增变量系统变量NODE_PATH 选择自己安装的位置
“用户变量”:编辑用户变量里的Path,新建一条(路径填自己的)
④测试
另一种:
var http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, {
'Content-type': 'text/plain'
});
response.end('hello world\n');
}).listen(3000);
console.log('Server running at http://localhost:3000/');