repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
express-worker_threads
/
src
/
main.ts
diff --git
a/examples/typescript/http-server-pool/express-worker_threads/src/main.ts
b/examples/typescript/http-server-pool/express-worker_threads/src/main.ts
index 970cf4d0d52f9f8bd78f47d19e5b89d4ba61f047..4f1a4d957a75d3274052f56237bd2bdcea243054 100644
(file)
--- a/
examples/typescript/http-server-pool/express-worker_threads/src/main.ts
+++ b/
examples/typescript/http-server-pool/express-worker_threads/src/main.ts
@@
-21,7
+21,7
@@
expressApp.use(express.json())
expressApp.all('/api/echo', (req: Request, res: Response) => {
requestHandlerPool
.execute({ body: req.body }, 'echo')
expressApp.all('/api/echo', (req: Request, res: Response) => {
requestHandlerPool
.execute({ body: req.body }, 'echo')
- .then(
(response)
=> {
+ .then(
response
=> {
return res.send(response.body).end()
})
.catch(emptyFunction)
return res.send(response.body).end()
})
.catch(emptyFunction)
@@
-31,7
+31,7
@@
expressApp.get('/api/factorial/:number', (req: Request, res: Response) => {
const { number } = req.params
requestHandlerPool
.execute({ body: { number: parseInt(number) } }, 'factorial')
const { number } = req.params
requestHandlerPool
.execute({ body: { number: parseInt(number) } }, 'factorial')
- .then(
(response)
=> {
+ .then(
response
=> {
return res.send(response.body).end()
})
.catch(emptyFunction)
return res.send(response.body).end()
})
.catch(emptyFunction)