UNPKG

rocksteady

Version:

Drink blazin' electric death, downtime! Fast, zero-downtime apps for production enviroments.

46 lines (41 loc) 1.06 kB
// Generated by CoffeeScript 1.9.1 var Master, wrapper; Master = require('./master'); wrapper = { Master: Master, run: function(serverModule, opts, cb) { var master, ref; if (opts == null) { opts = {}; } if (cb == null) { cb = function() {}; } if (typeof opts === 'function') { ref = [opts, {}], cb = ref[0], opts = ref[1]; } if (opts.forceKillTimeout == null) { opts.forceKillTimeout = process.env.FORCE_KILL_TIMOUT; } if (opts.host == null) { opts.host = process.env.HOST; } if (opts.port == null) { opts.port = process.env.PORT; } if (opts.restartCooldown == null) { opts.restartCooldown = process.env.RESTART_COOLDOWN; } if (opts.socketTimeout == null) { opts.socketTimeout = process.env.SOCKET_TIMEOUT; } if (opts.workers == null) { opts.workers = process.env.WORKERS; } master = new Master(serverModule, opts); master.run(cb); return master; } }; module.exports = wrapper; //# sourceMappingURL=index.js.map