Skip to content

Instantly share code, notes, and snippets.

@GaetanoPiazzolla
Last active April 11, 2021 20:11
Show Gist options
  • Save GaetanoPiazzolla/472be7aa3e3c0aacf25fc5e82cf84b69 to your computer and use it in GitHub Desktop.
Save GaetanoPiazzolla/472be7aa3e3c0aacf25fc5e82cf84b69 to your computer and use it in GitHub Desktop.
app.get('/cpu-intensive/:type/:num/:threads', (req,res) => {
console.log('Type: ',req.params.type)
console.log('Num:' ,req.params.num)
console.log('Threads:' ,req.params.threads)
// switch method to run based on TYPE
// increasing NUM means increasing CPU-operations
// THREADS are the threads to use when using arrays of workers
console.log('---')
})
@GaetanoPiazzolla
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment