From 2850be580a1081cc374c94d439cc8a97c0077e94 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 8 Sep 2016 18:07:30 -0600 Subject: [PATCH] note store option --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79a2810..81eaa09 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,10 @@ npm install --save memstore-cluster@2.x v1.x vs v2.x ------------ -The old v1 used `ws` which makes it usable when clustering node processes without using `cluster`. +The [old v1](https://github.com/coolaj86/cluster-store/tree/v1.x) +used `ws` which makes it usable when clustering node processes without using `cluster`. -If you need that functionaliy, use it. +If you need that functionaliy, use v1 instead of v2. Usage ===== @@ -45,6 +46,7 @@ var cluster = require('cluster'); var cstore = require('cluster-store/master').create({ name: 'foo-store' +, store: null // use default in-memory store }); cstore.addWorker(cluster.fork()); @@ -54,6 +56,11 @@ cstore.then(function (store) { }); ``` +Note: `store` can be replaced with any `express/session` store, such as: + * `new require('express-session/session/memory')()` + * `require('level-session-store')(session)` + * and others + ### worker ```javascript