Package Exports
- @bedrock/session-mongodb
- @bedrock/session-mongodb/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bedrock/session-mongodb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bedrock-session-mongodb
A bedrock module that enables express session storage via MongoDB.
Requirements
- npm v9+
Quick Examples
npm install @bedrock/session-mongodbSimply 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();Configuration
For documentation on configuration, see config.js.