Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleaning up options object support

  • Loading branch information...
commit 26314b1b70f348658045b017f119cf9adc0ca719 1 parent f62fa66
@tj authored
Showing with 4 additions and 3 deletions.
  1. +1 −1  examples/basic.js
  2. +3 −2 lib/cluster-live.js
View
2  examples/basic.js
@@ -21,6 +21,6 @@ cluster(server)
.use(cluster.debug())
.use(cluster.repl(9999))
.use(cluster.stats({ connections: true, lightRequests: true }))
- .use(live())
+ .use(live(3001))
.listen(3000);
View
5 lib/cluster-live.js
@@ -36,10 +36,11 @@ exports.version = '0.0.3';
function live(port, host, options) {
// juggle arguments
+ options = options || {};
if ('object' == typeof port) options = port, port = null;
if ('object' == typeof host) options = host, host = null;
- if (null == port) port = (options && options.port) || 8888;
- if (null == host && options && options.host) host = options.host;
+ if (null == port) port = options.port || 8888;
+ host = host || options.host;
function live(master) {
if (!master.stats) throw new Error('cluster-live requires the stats() plugin');
Please sign in to comment.
Something went wrong with that request. Please try again.