@appolo/cluster

0.0.1 • Public • Published

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);
    }
})

Readme

Keywords

none

Package Sidebar

Install

npm i @appolo/cluster

Weekly Downloads

114

Version

0.0.1

License

MIT

Unpacked Size

17.7 kB

Total Files

20

Last publish

Collaborators

  • saar120
  • shmoop207