Last active
December 30, 2015 02:49
-
-
Save Torokun/7765308 to your computer and use it in GitHub Desktop.
Oneline HTTPD?
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
node -e "(function(){var port = 8080; require('http').createServer(function(req, res){req.addListener('data', function(dataChunk){}); req.addListener('end', function(){res.writeHead(200, {'Content-Type' : 'text/html'}); res.end('Hello, World');});}).listen(port);})();" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/6084360/node-js-as-a-simple-web-server