import type { AddressInfo } from 'node:net'
-import { ClusterWorker } from 'poolifier'
+
import Fastify, { type FastifyInstance } from 'fastify'
+import { ClusterWorker } from 'poolifier'
+
import type { WorkerData, WorkerResponse } from './types.js'
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
await FastifyWorker.fastify.listen({ port })
return {
status: true,
- port: (FastifyWorker.fastify.server.address() as AddressInfo)?.port
+ port: (FastifyWorker.fastify.server.address() as AddressInfo).port
}
}