X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-cluster%2Fsrc%2Fworker.ts;h=7003e265492b4e9d0c8d9974978e8c996bf7a0d6;hb=d31c07f64b4ec0496f25490af9c72431bd77c6b4;hp=e491fa8f4b05c3ee4712740e1e669a102775108e;hpb=e1ba9765afbf97436250d19f28c818221ebc10b9;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 e491fa8f..7003e265 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts @@ -24,10 +24,11 @@ class FastifyWorker extends ClusterWorker { private static readonly startFastify = async ( workerData?: WorkerData ): Promise => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const { port } = workerData! FastifyWorker.fastify = Fastify({ - logger: true + logger: true, }) FastifyWorker.fastify.all('/api/echo', request => { @@ -44,7 +45,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, } } @@ -52,7 +53,7 @@ class FastifyWorker extends ClusterWorker { super(FastifyWorker.startFastify, { killHandler: async () => { await FastifyWorker.fastify.close() - } + }, }) } }