X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-cluster%2Fsrc%2Fworker.ts;h=5fca89058695c7a45614b15d2eeb10bd690d9491;hb=3ba1ac7b5f0ee68d776330b6a9137eb124b186ac;hp=2f6c8f6dec1fcf405c8ce5bdb78a51c84c7c1915;hpb=8538ea4ccb5672b3d4b846db1bedf80135c1df8b;p=poolifier.git 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 2f6c8f6d..5fca8905 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts @@ -16,7 +16,7 @@ class FastifyWorker extends ClusterWorker { private static readonly startFastify = async ( workerData?: WorkerData ): Promise => { - const { port } = workerData as WorkerData + const { port } = workerData! FastifyWorker.fastify = Fastify({ logger: true @@ -36,7 +36,7 @@ class FastifyWorker extends ClusterWorker { await FastifyWorker.fastify.listen({ port }) return { status: true, - port: (FastifyWorker.fastify.server.address() as AddressInfo)?.port + port: (FastifyWorker.fastify.server.address() as AddressInfo).port } }