private static readonly startFastify = async (
workerData?: ClusterWorkerData
): Promise<ClusterWorkerResponse> => {
- const { port, ...fastifyPoolifierOptions } = workerData as ClusterWorkerData
+ const { port, ...fastifyPoolifierOptions } = workerData!
FastifyWorker.fastify = Fastify({
logger: 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
}
}