1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00
Files
mywebsite/node_modules/forever/test/fixtures/server.js
2015-06-25 16:28:41 -05:00

17 lines
425 B
JavaScript

var util = require('util'),
http = require('http'),
argv = require('optimist').argv;
var port = argv.p || argv.port || 80;
http.createServer(function (req, res) {
console.log(req.method + ' request: ' + req.url);
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('hello, i know nodejitsu.');
res.end();
}).listen(port);
/* server started */
util.puts('> hello world running on port ' + port);