{"name":"@eggjs/cluster","version":"3.0.0-beta.2","keywords":["egg","cluster","process"],"author":{"name":"dead-horse","email":"dead_horse@qq.com"},"license":"MIT","_id":"@eggjs/cluster@3.0.0-beta.2","maintainers":[{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"wanghx","email":"whxaxes@gmail.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},{"name":"hubcarl","email":"hubcarl@126.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"akitasummer","email":"644171127@qq.com"}],"homepage":"https://github.com/eggjs/egg-cluster#readme","bugs":{"url":"https://github.com/eggjs/egg-cluster/issues"},"dist":{"shasum":"1291aaa0144decbc7bd7e11a492eb90a73f6dbf3","tarball":"http://registry-npm.ywwl.com/@eggjs/cluster/download/@eggjs/cluster-3.0.0-beta.2.tgz","fileCount":96,"integrity":"sha512-cxivw74OpaE4yGlEIw9kDoN7jSzeA/3vhn6jQhhxUfFJgFkbhBUCUA3TBgwzu2jVbk4PPh6FldINpgI+0U+DjA==","signatures":[{"sig":"MEUCIQDEWJSRv0t8pppXz0pJByQ1VP+qr9Y/xbJsniRGEhZfdAIgNtG6dRd7fOFucmLTkrPVsx2egOgIiomSu9rBTBeFMPQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":385501,"size":72091,"noattachment":false,"key":"/@eggjs/cluster/-/@eggjs/cluster-3.0.0-beta.2.tgz"},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">= 18.19.0"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"b7f3d2b24621262fc6058939c5bb1fa7c6ecf1ac","scripts":{"ci":"egg-bin cov && attw --pack","lint":"eslint --cache src test --ext .ts","test":"egg-bin test","preci":"npm run lint && npm run prepublishOnly","pretest":"npm run lint -- --fix && npm run prepublishOnly","prepublishOnly":"tshy && tshy-after"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git+https://github.com/eggjs/egg-cluster.git","type":"git"},"_npmVersion":"10.9.0","description":"cluster manager for egg","directories":{},"_nodeVersion":"22.12.0","dependencies":{"cfork":"^2.0.0","utility":"^2.2.0","get-ready":"^3.2.0","egg-logger":"^3.6.0","detect-port":"^2.0.1","sendmessage":"^3.0.1","@eggjs/utils":"^4.0.2","terminal-link":"^2.1.1","cluster-reload":"^2.0.0","@fengmk2/ps-tree":"^2.0.1","graceful-process":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"egg":"beta","tshy":"3","coffee":"^5.5.1","eslint":"8","urllib":"^4.6.8","address":"^2.0.3","egg-bin":"6","ts-node":"^10.9.1","egg-mock":"beta","supertest":"^7.0.0","egg-errors":"^2.2.0","tshy-after":"1","typescript":"5","@types/node":"22","@types/mocha":"10","@eggjs/tsconfig":"1","eslint-config-egg":"14","@arethetypeswrong/cli":"^0.17.1"},"_npmOperationalInternal":{"tmp":"tmp/cluster_3.0.0-beta.2_1734422722397_0.3552214033166803","host":"s3://npm-registry-packages-npm-production"},"readme":"# @eggjs/cluster\n\n[![NPM version][npm-image]][npm-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/@eggjs/cluster.svg?style=flat)](https://nodejs.org/en/download/)\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/cluster.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/cluster\n[snyk-image]: https://snyk.io/test/npm/@eggjs/cluster/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/@eggjs/cluster\n[download-image]: https://img.shields.io/npm/dm/@eggjs/cluster.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/cluster\n\nCluster Manager for EggJS\n\n## Install\n\n```bash\nnpm i @eggjs/cluster\n```\n\n## Usage\n\nCommonJS\n\n```js\nconst { startCluster } = require('@eggjs/cluster');\n\nstartCluster({\n  baseDir: '/path/to/app',\n  framework: '/path/to/framework',\n});\n```\n\nYou can specify a callback that will be invoked when application has started.\nHowever, master process will exit when catch an error.\n\n```js\nstartCluster(options).then(() => {\n  console.log('started');\n});\n```\n\nESM and TypeScript\n\n```ts\nimport { startCluster } from '@eggjs/cluster';\n\nstartCluster({\n  baseDir: '/path/to/app',\n  framework: '/path/to/framework',\n});\n```\n\n## Options\n\n| Param     | Type            | Description                                                                                                       |\n| --------- | --------------- | ----------------------------------------------------------------------------------------------------------------- |\n| baseDir   | `String`        | directory of application                                                                                          |\n| framework | `String`        | specify framework that can be absolute path or npm package                                                        |\n| plugins   | `Object`        | plugins for unittest                                                                                              |\n| workers   | `Number`        | numbers of app workers                                                                                            |\n| sticky    | `Boolean`       | sticky mode server                                                                                                |\n| port      | `Number`        | port                                                                                                              |\n| debugPort | `Number`        | the debug port only listen on http protocol                                                                       |\n| https     | `Object`        | start a https server, note: `key` / `cert` / `ca` should be full path to file                                     |\n| require   | `Array\\|String` | will inject into worker/agent process                                                                             |\n| pidFile   | `String`        | will save master pid to this file                                                                                 |\n| startMode | `String`        | default is 'process', use 'worker_threads' to start the app & agent worker by worker_threads                      |\n| ports     | `Array`         | startup port of each app worker, such as: [7001, 7002, 7003], only effects when the startMode is 'worker_threads' |\n| env       | `String`        | custom env, default is process.env.EGG_SERVER_ENV                                                                 |\n\n## Env\n\n`EGG_APP_CLOSE_TIMEOUT`: app worker boot timeout value\n\n`EGG_AGENT_CLOSE_TIMEOUT`: agent worker boot timeout value\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=eggjs/egg)](https://github.com/eggjs/egg/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","publish_time":1734422722541,"_cnpm_publish_time":1734422722541,"dist-tags":{"beta":"4.0.2-beta.27","latest":"4.1.0","rc":"4.0.2-rc.1"}}