We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd essentially like to create a throttled server. I thought I could do something like this:
require('http').createServer(function (request, response) { request.addListener('end', function () { setTimeout(function () { fileServer.serve(request, response); }, 2000); }).resume(); }).listen(8080);
As you can see, I've wrapped my server() call in a setTimeout. This doesn't seem to be working, though.
server()
setTimeout
How can I throttle my server?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd essentially like to create a throttled server. I thought I could do something like this:
As you can see, I've wrapped my
server()
call in asetTimeout
. This doesn't seem to be working, though.How can I throttle my server?
The text was updated successfully, but these errors were encountered: