Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

usage docs

  • Loading branch information...
commit a8a5ce99d4d35e1ba57375abff6576e6f2753dfb 1 parent f4a3d0c
TJ Holowaychuk authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 Readme.md
15 Readme.md
View
@@ -7,6 +7,21 @@
$ npm install cluster-live
+## Usage
+
+ Cluster live requires that `stats()` is `use()`ed, enabling connection and "light request" statistics. The `lightRequests` option simply enables light-weight request statistics better suited for realtime reporting.
+
+ var live = require('cluster-live');
+
+ cluster(server)
+ .set('workers', 6)
+ .use(cluster.debug())
+ .use(cluster.stats({ connections: true, lightRequests: true }))
+ .use(live())
+ .listen(3000);
+
+ Optionally a `port`, `host` and TLS `options` options may be used to customize and secure the cluster-live server.
+
## Examples
First start the example application and cluster-live:
Please sign in to comment.
Something went wrong with that request. Please try again.