An expression-session-store for Neo4j

Hi everyone.

I wrote a session store for neo4j and express-session. You can use it with

npm install neo4j-session-store

The use case is here that you want a web session store on Neo4j, for example because you only want to have one database in your app.

  table: {
    name: "sessions",
    hashKey: "sessionId",
    hashPrefix: "sessions:",
  neo4jConfig: {
    neo4jurl: "bolt://localhost:7687",
    neo4juser: "neo4j",
    neo4jpwd: "test",
  touchInterval: 0,

var Neo4jSessionStore = require('Neo4jSessionStore').default;

var sessionConfig = {
    secret: 'mysecret',
    store: new Neo4jSessionStore(STORE_OPTIONS),
    resave: false,
    saveUninitialized: false,
    genid: (req) => {
        return uuidv4(); 
    cookie: {
        httpOnly: true,
        sameSite: 'strict',



Jan Brogger

1 Like