2019-09-06 23:53:10 +08:00

9 lines
253 B
JavaScript
Executable File

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {
'Server': "node.js"}
);
res.end("<h1>Hello World</h2>");
}).listen(8080, '127.0.0.1');
console.log('Server running at http://127.0.0.1:8080/');