1.6.7 • Published 7 years ago

nodinx-cluster v1.6.7

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

egg-cluster

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Cluster Manager for Nodinx


Install

$ npm i egg-cluster

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

ParamTypeDescription
baseDirStringdirectory of application
frameworkStringspecify framework that can be absolute path or npm package
pluginsObjectplugins for unittest
workersNumbernumbers of app workers
stickyBooleansticky mode server
portNumberport
httpsBooleanstart a https server
keyStringssl key
certStringssl cert

License

MIT