Skip to content

Instantly share code, notes, and snippets.

@IPRIT
Created April 11, 2015 13:29
Show Gist options
  • Select an option

  • Save IPRIT/96c33662851b40077307 to your computer and use it in GitHub Desktop.

Select an option

Save IPRIT/96c33662851b40077307 to your computer and use it in GitHub Desktop.
var args = process.argv.slice(2);
var http = require('http');
var map = require('through2-map');
var server = http.createServer(function(req, res) {
req.pipe(map(function(chunk) {
return chunk.toString().toUpperCase();
})).pipe(res);
//console.log(req.pipe);
});
server.listen(+args[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment