Created
March 13, 2014 04:55
-
-
Save jeonghwan-kim/9522068 to your computer and use it in GitHub Desktop.
http server only using http module.
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'); | |
// Create an HTTP server | |
var srv = http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('okay'); | |
throw 'Error'; | |
}); | |
srv.listen(9999, '127.0.0.1', function() { | |
console.log("server is running"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
forever가 죽은 프로세스를 자동 재실행하는지 시험하기 위한 코드다.