egg-cluster
cluster manager for egg
Last updated 6 years ago by popomore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install egg-cluster 
SYNC missed versions from official npm registry.

egg-cluster

NPM version CI Test coverage Known Vulnerabilities npm download

Cluster Manager for EggJS


Install

npm i egg-cluster --save

Usage

const startCluster = require('egg-cluster').startCluster;
startCluster({
  baseDir: '/path/to/app',
  framework: '/path/to/framework',
});

You can specify a callback that will be invoked when application has started. However, master process will exit when catch an error.

startCluster(options, () => {
  console.log('started');
});

Options

Param Type Description
baseDir String directory of application
framework String specify framework that can be absolute path or npm package
plugins Object plugins for unittest
workers Number numbers of app workers
sticky Boolean sticky mode server
port Number port
debugPort Number the debug port only listen on http protocol
https Object start a https server, note: key / cert / ca should be full path to file
require Array\|String will inject into worker/agent process
pidFile String will save master pid to this file
startMode String default is 'process', use 'worker_threads' to start the app & agent worker by worker_threads
ports Array startup port of each app worker, such as: [7001, 7002, 7003], only effects when the startMode is 'worker_threads'
env String custom env, default is process.env.EGG_SERVER_ENV

Env

EGG_APP_CLOSE_TIMEOUT: app worker boot timeout value

EGG_AGENT_CLOSE_TIMEOUT: agent worker boot timeout value

License

MIT

Contributors


popomore


fengmk2


atian25


dead-horse


killagu


semantic-release-bot


ngot


hyj1991


whxaxes


iyuq


nightink


mansonchor


ImHype


gxcsoccer


waitingsong


sjfkai


ahungrynoob


qingdengyue


wenjiasen


czy88840616


gxkl

This project follows the git-contributor spec, auto updated at Mon Jun 03 2024 10:59:15 GMT+0800.

Current Tags

  • 2.3.0                                ...           latest (7 months ago)

64 Versions

  • 2.3.0                                ...           7 months ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.27.1                                ...           3 years ago
  • 1.27.0                                ...           4 years ago
  • 1.26.0                                ...           5 years ago
  • 1.25.0                                ...           5 years ago
  • 1.24.0                                ...           6 years ago
  • 1.23.3                                ...           6 years ago
  • 1.23.2                                ...           6 years ago
  • 1.23.1                                ...           6 years ago
  • 1.23.0                                ...           6 years ago
  • 1.22.2                                ...           6 years ago
  • 1.22.1                                ...           6 years ago
  • 1.22.0                                ...           6 years ago
  • 1.21.0                                ...           6 years ago
  • 1.20.0                                ...           6 years ago
  • 1.19.1                                ...           6 years ago
  • 1.19.0                                ...           6 years ago
  • 1.18.0                                ...           7 years ago
  • 1.17.0                                ...           7 years ago
  • 1.16.1                                ...           7 years ago
  • 1.16.0                                ...           7 years ago
  • 1.15.0                                ...           7 years ago
  • 1.14.0                                ...           7 years ago
  • 1.13.1                                ...           7 years ago
  • 1.13.0                                ...           7 years ago
  • 1.12.6                                ...           7 years ago
  • 1.12.5                                ...           7 years ago
  • 1.12.4                                ...           7 years ago
  • 1.12.3                                ...           7 years ago
  • 1.12.2                                ...           7 years ago
  • 1.12.1                                ...           7 years ago
  • 1.12.0                                ...           7 years ago
  • 1.11.2                                ...           7 years ago
  • 1.11.1                                ...           7 years ago
  • 1.11.0                                ...           7 years ago
  • 1.10.0                                ...           7 years ago
  • 1.9.2                                ...           7 years ago
  • 1.9.1                                ...           7 years ago
  • 1.9.0                                ...           7 years ago
  • 1.8.0                                ...           8 years ago
  • 1.7.0                                ...           8 years ago
  • 1.6.4                                ...           8 years ago
  • 1.6.3                                ...           8 years ago
  • 1.6.2                                ...           8 years ago
  • 1.6.1                                ...           8 years ago
  • 1.6.0                                ...           8 years ago
  • 1.5.0                                ...           8 years ago
  • 1.4.0                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
  • 0.0.4                                ...           8 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           9 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (17)
Dev Dependencies (13)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE