Nodejs, Nestjs.
cluster service gets imported in main through services decorator. cluster.service.ts import { Injectable } from '@nestjs/common'; const cluster = require('cluster'); import * as process from 'node:process'; const numCPUs = parseInt(process.argv[2] || "1"); @Injectable() export class ClusterService