boring-cluster
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -5,8 +5,10 @@ const cluster = require('cluster') | ||
const boringCluster = (m, opts = {}) => { | ||
const boringCluster = (m, { | ||
name = '', | ||
workers = cpus().length | ||
} = {}) => { | ||
const mod = resolve(m) | ||
const { workers = cpus().length, name = '' } = opts | ||
if (cluster.isMaster) { | ||
Array(workers).fill(null).forEach(() => { | ||
Array.from({ length: workers }).forEach(() => { | ||
cluster.fork() | ||
@@ -13,0 +15,0 @@ }) |
{ | ||
"name": "boring-cluster", | ||
"description": "A really boring cluster module", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"author": { | ||
@@ -41,13 +41,13 @@ "name": "Zac Anger", | ||
"devDependencies": { | ||
"babel-eslint": "8.2.3", | ||
"eslint": "4.19.1", | ||
"eslint-config-zacanger": "3.1.2", | ||
"eslint-plugin-babel": "5.1.0", | ||
"eslint-plugin-import": "2.11.0", | ||
"eslint-plugin-promise": "3.7.0", | ||
"eslint-plugin-unicorn": "4.0.3" | ||
"babel-eslint": "9.0.0", | ||
"eslint": "5.6.0", | ||
"eslint-config-zacanger": "3.4.1", | ||
"eslint-plugin-babel": "5.2.0", | ||
"eslint-plugin-import": "2.14.0", | ||
"eslint-plugin-promise": "4.0.1", | ||
"eslint-plugin-unicorn": "6.0.1" | ||
}, | ||
"engines": { | ||
"node": ">=6.4.0" | ||
"node": ">=8.12.0" | ||
} | ||
} |
@@ -36,4 +36,3 @@ # boring-cluster | ||
// index.js | ||
const cluster = require('boring-cluster') | ||
cluster( | ||
require('boring-cluster')( | ||
'server', | ||
@@ -56,7 +55,6 @@ { name: 'sweet server', workers: 2 } | ||
This is tested on Node as far back as 6.4.0, and may work on even more ancient | ||
versions. | ||
## Changes | ||
## Change | ||
* 4.0.0 - 22nd September 2018: | ||
* Drop Node 6 support | ||
* 3.0.0 - 6th May 2018: | ||
@@ -63,0 +61,0 @@ * Resolve module internally |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21
3965
65