Skip to content

Instantly share code, notes, and snippets.

@devarajchidambaram
Created September 6, 2018 07:19
Show Gist options
  • Save devarajchidambaram/f61753e9edb0b042a0f4459a2ded7d70 to your computer and use it in GitHub Desktop.
Save devarajchidambaram/f61753e9edb0b042a0f4459a2ded7d70 to your computer and use it in GitHub Desktop.
Timeout express bound
var http = require('http');
var srvr = http.createServer(function (req, res) {
setTimeout(function(){
res.write('Hello World!');
res.end();
}, 5000)
});
srvr.listen(8080);
console.log(srvr.timeout);
srvr.timeout = 2000;
console.log(srvr.timeout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment