K
K
KnightForce2017-01-26 00:28:43
Node.js
KnightForce, 2017-01-26 00:28:43

How to use your Mongoose storage for sessions?

How to use your Mongoose storage for sessions?
To insert and validate data yourself.
So far, based on all sorts of manuals, I wrote this:

let session = require("express-session");
let  MongoStore = require("connect-mongo")(session);

app.use(session({
   secret: "secret",
   name: "name",
   cookie: {
      path: "/",
      "httpOnly": true,
      saveUnitialized: true,
  }
   resave: true,
   saveUnitialized; true,
   stroe: new MongoStore({mongooseConnection: connection})
}));

It works, but I don’t know how to perform independent manipulations with such a recording.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2017-01-26
@LiguidCool

And what do you actually want? Read the man on express-session

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question