Node.js Hello World
昨天node.js算是装好了,从今天开始要开始重拾node.js了。
当然,第一步还是 hello world, 照着官网的例子弄一个:
var http = require('http'); http.createServer(function(req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World!'); }).listen(1216, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1216/');
去终端里运行一下,
Read more »