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' into combine-prs-branch
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
fastify-cluster
/
src
/
worker.ts
diff --git
a/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
b/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
index eb546ef0a9d82c189d2ef5b799395321c7d8df62..283a223e3438aa07af36343368d6dd03de05017e 100644
(file)
--- a/
examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
+++ b/
examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
@@
-17,6
+17,7
@@
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
workerData?: WorkerData
): Promise<WorkerResponse> => {
const { port } = workerData as WorkerData
workerData?: WorkerData
): Promise<WorkerResponse> => {
const { port } = workerData as WorkerData
+
FastifyWorker.fastify = Fastify({
logger: true
})
FastifyWorker.fastify = Fastify({
logger: true
})
@@
-35,7
+36,7
@@
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
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
}
}
}
}