Last active
December 8, 2017 16:42
-
-
Save voidnerd/97c90fd97f6bb6a7e0adcd5162466475 to your computer and use it in GitHub Desktop.
This file contains 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 http = require('http'); | |
var fs = require('fs'); | |
var server = http.createServer(function (req, res) { | |
res.writeHead(200, { 'content-type': 'text/plain' }) | |
fs.createReadStream(process.argv[3]).pipe(res); | |
}) | |
server.listen(process.argv[2]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment