Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulpdaniels/connect-neo4j-store
A Neo4j store middleware adapter
https://github.com/paulpdaniels/connect-neo4j-store
adapter connect neo4j session-store
Last synced: about 1 month ago
JSON representation
A Neo4j store middleware adapter
- Host: GitHub
- URL: https://github.com/paulpdaniels/connect-neo4j-store
- Owner: paulpdaniels
- License: mit
- Created: 2017-07-12T04:04:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T22:47:20.000Z (over 7 years ago)
- Last Synced: 2024-11-12T12:52:18.192Z (3 months ago)
- Topics: adapter, connect, neo4j, session-store
- Language: JavaScript
- Size: 25.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# connect-neo4j-store
A Neo4j store middleware adapter[![CircleCI](https://img.shields.io/circleci/project/github/paulpdaniels/connect-neo4j-store.svg)](https://github.com/paulpdaniels/connect-neo4j-store)
[![Codecov](https://img.shields.io/codecov/c/github/paulpdaniels/connect-neo4j-store.svg)](https://github.com/paulpdaniels/connect-neo4j-store)A simple neo4j based store adapter for sessions.
### Warning: Experimental (You have been warned)
Currently I only have very primitive support for sessions, there is no way through this library to link a session to any other nodes or create external relationships. However, this should support the minimum API for a connect session `Store`.
Again proceed at your own risk.
### Usage
```javascript
const session = require('express-session');
const Neo4jStore = require('connect-neo4j-store')(session);app.use(session({
secret: 'foo',
store: new Neo4jStore(options)
})```
#### Connection to a Neo4jDB
**Through a url**
```javascript
const store = new Neo4jStore('http://username:password@localhost:7474');
// Or with an object bag
const store = new Neo4jStore({url: 'http://username:password@localhost:7474'});```
**Reuse and existing client**
```javascript
const db = new neo4j.GraphDatabase(url)
const store = new Neo4jStore({client: db});```