X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-hybrid%2Fsrc%2Ffastify-worker.ts;h=28bf2a01f1cb0d15aff9b86d3bbbeed98c9bd808;hb=e1b768660b1cb0a444a73366e047d7c6fb56b570;hp=0566ee014dd75e8520f93ee154f304018707f70d;hpb=1fa0cdf5c1471f14c09c7a33131f14f13215996b;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 0566ee01..28bf2a01 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 @@ -24,7 +24,7 @@ ClusterWorkerResponse 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 @@ -32,7 +32,7 @@ ClusterWorkerResponse 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')