Skip to content

Instantly share code, notes, and snippets.

@jeonghwan-kim
Created March 13, 2014 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeonghwan-kim/9522068 to your computer and use it in GitHub Desktop.
Save jeonghwan-kim/9522068 to your computer and use it in GitHub Desktop.
http server only using http module.
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");
});
@jeonghwan-kim
Copy link
Author

forever가 죽은 프로세스를 자동 재실행하는지 시험하기 위한 코드다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment