Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created August 28, 2019 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/d8696e57458dab0f6b1eefd1b1399cc8 to your computer and use it in GitHub Desktop.
Save tsh-code/d8696e57458dab0f6b1eefd1b1399cc8 to your computer and use it in GitHub Desktop.
const timeConsumingOperationWithThreads = require('./heavy-computing-with-threads')
/* … */
app.get('/timeConsumingEndpoint', async (req, res) => {
const result = await timeConsumingOperationWithThreads()
res.send(result)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment