Skip to content

Instantly share code, notes, and snippets.

@yuriatgoogle
Created November 12, 2018 18:57
Show Gist options
  • Save yuriatgoogle/5de9af9924c8ff12f2f7084c9d948a67 to your computer and use it in GitHub Desktop.
Save yuriatgoogle/5de9af9924c8ff12f2f7084c9d948a67 to your computer and use it in GitHub Desktop.
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