Skip to content

Instantly share code, notes, and snippets.

@raskchanky
Created January 20, 2016 16:28
Show Gist options
  • Save raskchanky/ef116945a5cac440fa68 to your computer and use it in GitHub Desktop.
Save raskchanky/ef116945a5cac440fa68 to your computer and use it in GitHub Desktop.
node.js HTTP server for simulating timeouts
var http = require('http');
var timeout = 100000;
http.createServer(function (req, res) {
setTimeout((function() {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end("Success");
}), timeout);
}).listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment