New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

memorystore

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memorystore

express-session full featured MemoryStore layer without leaks!

  • 1.3.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is memorystore?

The 'memorystore' npm package is a session store for Express.js that uses a memory-based storage system. It is designed to be a simple and efficient way to store session data in memory, which can be useful for development and testing environments where persistence is not required.

What are memorystore's main functionalities?

Session Store Initialization

This code sample demonstrates how to initialize a session store using 'memorystore' in an Express.js application. The store is configured to prune expired entries every 24 hours, and sessions are set up with a maximum age of 24 hours.

const session = require('express-session');
const MemoryStore = require('memorystore')(session);

const store = new MemoryStore({
  checkPeriod: 86400000 // prune expired entries every 24h
});

app.use(session({
  cookie: { maxAge: 86400000 },
  store: store,
  resave: false,
  saveUninitialized: true,
  secret: 'your-secret-key'
}));

Other packages similar to memorystore

Keywords

FAQs

Package last updated on 19 Jul 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc