https://github.com/huseyinbabal/connect-hazelcast
Hazelcast session store for Connect and Express
https://github.com/huseyinbabal/connect-hazelcast
express-session hazelcast hazelcast-cloud
Last synced: 5 months ago
JSON representation
Hazelcast session store for Connect and Express
- Host: GitHub
- URL: https://github.com/huseyinbabal/connect-hazelcast
- Owner: huseyinbabal
- Created: 2019-04-10T12:33:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T20:31:47.000Z (over 3 years ago)
- Last Synced: 2025-09-29T11:35:54.491Z (9 months ago)
- Topics: express-session, hazelcast, hazelcast-cloud
- Language: JavaScript
- Size: 44.9 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/huseyinbabal/connect-hazelcast)
**connect-hazelcast** is a Hazelcast session store backed by Hazelcast 4.x.
Quick Setup
-----
```sh
npm install connect-hazelcast express-session
```
Pass the `express-session` to `connect-hazelcast` to create a `HazelcastStore` constructor.
```js
const session = require('express-session');
const HazelcastStore = require('connect-hazelcast')(session);
app.use(session({
store: new HazelcastStore(options),
secret: 'ssshhh'
}));
```
Options
-------
The following list contains all supported options:
- `client` An existing hazelcast client. Required option.
- `prefix` IMap name to use for storing sessions. Defaults to `sessions`.
- `ttl` Default TTL in seconds to use when the session cookie does not have a `expires` value. Defaults to `86400` (one day).
- `disableTouch` When set to `true`, TTL is reset on each user interaction with the server. Defaults to `false`.