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