hazelcast-store
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "hazelcast-store", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Hazelcast implementation of expressjs session store", | ||
@@ -14,2 +14,6 @@ "main": "index.js", | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jackspaniel/hazelcast-store" | ||
}, | ||
"dependencies": { | ||
@@ -16,0 +20,0 @@ "debug": "^2.2.0" |
@@ -16,10 +16,7 @@ [![npm](https://img.shields.io/npm/v/hazelcast-store.svg)](https://npmjs.com/package/hazelcast-store) [![Dependencies](https://img.shields.io/david/jackspaniel/hazelcast-store.svg)](https://david-dm.org/jackspaniel/hazelcast-store) ![Downloads](https://img.shields.io/npm/dm/hazelcast-store.svg) | ||
```js | ||
var session = require('express-session'); | ||
var HazecastStore = require('hazelcast-store')(session); | ||
const session = require('express-session'); | ||
const HazelcastStore = require('hazelcast-store')(session); | ||
const hzStore = new HazelcastStore({ ttl: 15*60*1000, debugPrefix: 'oc' }); | ||
app.use(session({ | ||
store: hzStore, | ||
secret: 'argle bargle' | ||
})); | ||
app.use(session({ store: hzStore, secret: 'argle bargle' })); | ||
``` | ||
@@ -33,12 +30,7 @@ | ||
var clientConfig = new HazelcastConfig.ClientConfig(); | ||
const clientConfig = new HazelcastConfig.ClientConfig(); | ||
clientConfig.networkConfig.addresses = [{host: '127.0.0.1', 5701}]; | ||
HazelcastClient | ||
.newHazelcastClient(clientConfig) | ||
.then(function (hzInstance) { | ||
debug("HazelCast Client successfully created!"); | ||
if (hazelcastStore && config.hazelcast.sessions) | ||
hazelcastStore.setClient(hzInstance); | ||
app.hzClient = hzInstance; | ||
HazelcastClient.newHazelcastClient(clientConfig).then((hzInstance) => { | ||
hazelcastStore.setClient(hzInstance); | ||
}); | ||
@@ -45,0 +37,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
16693
63