A MongoDB session store for Express.js, built on the official mongodb driver v4. It provides a simple way to persist session data in MongoDB. Currently at version 0.0.2-beta.1, it is in early beta with an unstable API. It relies on mongodb ^4.8.0 as a peer dependency and ships TypeScript definitions. Compared to connect-mongo, it has fewer features and less community adoption, but offers direct integration with the modern MongoDB driver.
npm install neutrinos-mongodb-session-storeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a MongoDB session store, connect to MongoDB, and use it with express-session in an Express app.
Pin to exact version and monitor releases for breaking changes.
Use mongodb ^4.8.0 peer dependency; upgrade driver only after verifying compatibility.
Ensure your application uses async/await or promises when interacting with store methods.
Do not modify the TTL index created by the store on the sessions collection.
Use import MongoDBSessionStore from 'neutrinos-mongodb-session-store'.
Ensure client.connect() is called before instantiating MongoDBSessionStore.
Provide a valid dbName string when creating the store instance.