Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
connect-session-mongo
Advanced tools
This module is an addon for Connect Middleware that adds a new Session Storage device.
npm install connect-session-mongo
The standard usage, is to just pass an instantiated MongoStore
instance to the session plugin.
var connect = require('connect'),
MongoStore = require('connect-session-mongo');
var app = connect.createServer();
app.configure(function(){
app.use(connect.cookieDecoder());
app.use(connect.session({ store: new MongoStore() }));
app.use(app.router);
});
You can also pass several options to the constructor to tweak your session store:
connect-sessions
127.0.0.1
27017
sessions
An optional callback function(err, connectedDb) can also be passed to the constructor after the options.
var CustomServer = new Server(123.456.789.1, 12345, { auto_reconnect: true }, {});
app.use(connect.session({ store: new MongoStore({ server: CustomServer }) }));
app.use(connect.session({url: process.env.MONGO_URL}, function(err,db) {if (err) {throw err;}}));
Licensed the BSD license.
FAQs
MongoDB Session Store for Connect Middleware
We found that connect-session-mongo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.