X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-hybrid%2Fsrc%2Ffastify-worker.ts;h=0f4f6370b4c5249a2dfc8f2b4169d0245bbdda68;hb=6bca4154b0b57b8e4b0885a52a77cc8a70dccb88;hp=388730dcec9bda04a13315f4f0b5fb1814981266;hpb=edd5088275648b8ae534dcd75ba23443fe947954;p=poolifier.git 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 388730dc..0f4f6370 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/fastify-worker.ts @@ -13,7 +13,7 @@ ClusterWorkerResponse private static readonly startFastify = async ( workerData?: ClusterWorkerData ): Promise => { - const { port, ...fastifyPoolifierOptions } = workerData as ClusterWorkerData + const { port, ...fastifyPoolifierOptions } = workerData! FastifyWorker.fastify = Fastify({ logger: true @@ -42,7 +42,7 @@ ClusterWorkerResponse await FastifyWorker.fastify.listen({ port }) return { status: true, - port: (FastifyWorker.fastify.server.address() as AddressInfo)?.port + port: (FastifyWorker.fastify.server.address() as AddressInfo).port } }