import cluster from 'node:cluster'
import os from 'node:os'
import process from 'node:process'
import { log } from "./util";

if (cluster.isPrimary) {
    const n = os.availableParallelism();
    log.info(`Starting ${n} worker processes`)
    for (let i = 0; i < n; i++)
        cluster.fork()
} else {
    await import('./server')
}
