Connect-MongoDB is a MongoDB session store for Connect/Express.js, backed by node-mongodb-native. Version 1.1.5 is the latest (unmaintained since 2012) and is incompatible with 0.* versions. It requires explicit MongoDB connection or server configuration, supporting authentication and custom collection names. Known for its simplicity but lacks modern features like Mongoose connection reuse and automated cleanup via TTL indexes. Superseded by connect-mongo for modern Express.js applications.
npm install connect-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: create a MongoDB connection, instantiate the session store, and attach it to Connect/Express session middleware.
Update code to use Db/Server instances. Refer to README example.
Use mongodb.Db and mongodb.Server directly. Use mongoose.connection.db for Mongoose connections.
Migrate to connect-mongo for modern Express.js support.
Consider setting up a TTL index on the sessions collection manually via MongoDB shell or use connect-mongo.
Set native_parser: false if encountering parser errors.
Run 'npm install connect' in your project.
Ensure that the db and server_config options are passed correctly (instances, not strings).
Use 'var Server = require('mongodb').Server;' and ensure mongodb npm package is installed.