repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1347 from poolifier/combined-prs-branch
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
fastify-hybrid
/
src
/
fastify-worker.ts
diff --git
a/examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts
b/examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts
index e21eb58c01294014fd9557f067c6544bcfcca18a..388730dcec9bda04a13315f4f0b5fb1814981266 100644
(file)
--- a/
examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts
+++ b/
examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts
@@
-24,7
+24,7
@@
ClusterWorkerResponse
fastifyPoolifierOptions
)
fastifyPoolifierOptions
)
- FastifyWorker.fastify.all('/api/echo', async
(request)
=> {
+ FastifyWorker.fastify.all('/api/echo', async
request
=> {
return (
await FastifyWorker.fastify.execute({ data: request.body }, 'echo')
).data
return (
await FastifyWorker.fastify.execute({ data: request.body }, 'echo')
).data
@@
-32,7
+32,7
@@
ClusterWorkerResponse
FastifyWorker.fastify.get<{
Params: { number: number }
FastifyWorker.fastify.get<{
Params: { number: number }
- }>('/api/factorial/:number', async
(request)
=> {
+ }>('/api/factorial/:number', async
request
=> {
const { number } = request.params
return (
await FastifyWorker.fastify.execute({ data: { number } }, 'factorial')
const { number } = request.params
return (
await FastifyWorker.fastify.execute({ data: { number } }, 'factorial')
@@
-42,7
+42,7
@@
ClusterWorkerResponse
await FastifyWorker.fastify.listen({ port })
return {
status: true,
await FastifyWorker.fastify.listen({ port })
return {
status: true,
- port: (FastifyWorker.fastify.server.address() as AddressInfo).port
+ port: (FastifyWorker.fastify.server.address() as AddressInfo)
?
.port
}
}
}
}