Created
April 11, 2015 13:29
-
-
Save IPRIT/96c33662851b40077307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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