A bedrock module that enables express session storage via MongoDB.
- npm v9+
npm install @bedrock/session-mongodb
Simply require the bedrock-session-mongodb
module along with the
bedrock-express module and then any express session information will
be persisted via MongoDB.
import * as bedrock from '@bedrock/core';
// modules
import '@bedrock/server';
import '@bedrock/express';
import '@bedrock/session-mongodb';
bedrock.events.on('bedrock-express.configure.routes', function(app) {
app.get('/', function(req, res) {
res.send('Hello World!');
});
});
bedrock.start();
For documentation on configuration, see config.js.