github.com/cloudcredo/cloudrocker@v0.0.0-20160108110610-1320f8cc2dfd/sample-apps/node/node_modules/logfmt/examples/https.js (about) 1 2 var http = require('http'); 3 var logfmt = require('../logfmt'); 4 5 var HTTPhandler = function(req, res){ 6 logfmt.requestLogger()(req,res,function(){ 7 res.writeHead(200, {'Content-Type': 'text/plain'}); 8 res.end("Hello, Logfmt\n"); 9 }) 10 } 11 12 http.createServer(HTTPhandler).listen(3000) 13 console.log("listening on 3000")