import type { WorkerData, WorkerResponse } from './types.js'
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
private static fastify: FastifyInstance
import type { WorkerData, WorkerResponse } from './types.js'
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
private static fastify: FastifyInstance
Params: { number: number }
}>('/api/factorial/:number', request => {
const { number } = request.params
Params: { number: number }
}>('/api/factorial/:number', request => {
const { number } = request.params
super(FastifyWorker.startFastify, {
killHandler: async () => {
await FastifyWorker.fastify.close()
super(FastifyWorker.startFastify, {
killHandler: async () => {
await FastifyWorker.fastify.close()