Created
November 12, 2018 18:57
-
-
Save yuriatgoogle/5de9af9924c8ff12f2f7084c9d948a67 to your computer and use it in GitHub Desktop.
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
app.get('/', (req, res) => { | |
const delay = getRandomInt(5000); | |
console.log('request made'); | |
blockCpuFor(delay); | |
res.send('Delayed for ' + delay); | |
}) | |
app.listen(8080, () => console.log(`Example app listening on port 8080!`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment