0.0.1 • Published 10 months ago
@appolo/cluster v0.0.1
Appolo Cluster
run node server with cluster mode
install
npm install appolo-cluster
Usage
import {createCluser} from 'appolo-cluster';
createCluser({
workers: 2,
retry: Infinity,
startWorker: () => {
http.createServer((req, res) => {
res.writeHead(200);
res.end(`hello world from worker ${process.pid} on port ${port}`);
}).listen(3000);
}
})
0.0.1
10 months ago