GT2/GT2-iOS/node_modules/logfmt/examples/https.js

14 lines
321 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
var http = require('http');
var logfmt = require('../logfmt');
var HTTPhandler = function(req, res){
logfmt.requestLogger()(req,res,function(){
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end("Hello, Logfmt\n");
})
}
http.createServer(HTTPhandler).listen(3000)
console.log("listening on 3000")