node启动服务器

来源:互联网 发布:js escape 16进制 编辑:程序博客网 时间:2024/06/03 20:13
var http=require('http');
http.createServer(function(req,res){
res.writeHead(200,{
'Content-Type':'text/plain'
});
res.end('Helaaalo Woraaaaaaaa111111aaaald\n');
}).listen(1337,"127.0.0.1");


console.log('Server htpp://1271.0.0.1')


node 文件名运行

使用  npm -g install supervisor  安装文件监控 修改文件刷新及运行

运行  Supervisor nodejs.js

0 0
原创粉丝点击