This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bindSelectors = (selectors, stateSlice) => | |
Object.keys(selectors).reduce((prev, curr) => | |
({ ...prev, [curr]: (...args) => { | |
const [state, ...rest] = args; | |
return selectors[curr](state[stateSlice], ...rest); | |
}}), | |
{} | |
); | |
// State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script will boot the servers with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var chalk = require('chalk'); | |
// Define how many workers to run on the system |