function _isExpressApp(maybe){return!!maybe&&!!maybe.set&&!!maybe.use}function _charge(theGeneral){if(cluster.isMaster)for(var i=0;cpus>i;i++)cluster.fork();else theGeneral.listen(theGeneral.port||3e3);return theGeneral}function GeneralCluster(app){var theGeneral;return app?theGeneral=_isExpressApp(app)?app:express(app):(theGeneral=express(),theGeneral.get("/*",function(req,res){res.send("Hello World")})),_charge(theGeneral)}var express=require("express"),cluster=require("cluster"),cpus=require("os").cpus().length;module.exports=GeneralCluster;
"use strict";function _isExpressApp(maybe){return!!maybe&&!!maybe.set&&!!maybe.use}function _charge(theGeneral){if(cluster.isMaster)for(var i=0;cpus>i;i++)cluster.fork();else theGeneral.listen(theGeneral.port||3e3);return theGeneral}function GeneralCluster(app){var theGeneral;return app?theGeneral=_isExpressApp(app)?app:express(app):(theGeneral=express(),theGeneral.get("/*",function(req,res){res.send("Hello World")})),_charge(theGeneral)}var express=require("express"),cluster=require("cluster"),cpus=require("os").cpus().length;module.exports=GeneralCluster;
Rebuild dist for v1.0.0 launch
Rebuild dist for v1.0.0 launch
