diff --git a/index.js b/index.js index 4764eb2..5429ffb 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,10 @@ const Master = require('./lib/master'); * @method Egg#startCluster * @param {Object} options {@link Master} * @param {Function} callback start success callback + * @return {Object} - master */ exports.startCluster = function(options, callback) { - new Master(options).ready(callback); + const master = new Master(options); + master.ready(callback); + return master; };