Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Elasticsearch client support #53

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Updating the documentation
  • Loading branch information
Jack Pilowsky committed Sep 20, 2019
commit 902faa0eaced2f9b119dd35e6e4ae23b2729ec56
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -114,7 +114,27 @@ Sessionstore is a node.js module for multiple databases. It can be very useful i
})
}));

## Connecting to elasticsearch
## Connecting to elasticsearch (https://github.com/elastic/elasticsearch)

var sessionstore = require('sessionstore');

var express = require('express');
var app = express();

app.use(express.session({
store: sessionstore.createSessionStore({
type: '@elasticsearch',
host: 'localhost:9200', // optional
prefix: '', // optional
index: 'express', // optional
typeName: 'session', // optional
pingInterval: 1000, // optional
timeout: 10000 // optional
})
}));


## Connecting to elasticsearch legacy (https://github.com/elastic/elasticsearch-js-legacy)

var sessionstore = require('sessionstore');