universal-cookie-express
TypeScript icon, indicating that this package has built-in type declarations

7.2.2 • Public • Published

universal-cookie-express

Hook cookies get/set on Express for server-rendering

Integrations

State management integration

Getting started

npm install universal-cookie-express --save

Usage

cookiesMiddleware() express middleware set req.universalCookies

Example

const express = require('express');
const cookiesMiddleware = require('universal-cookie-express');

const app = express();

app.use(cookiesMiddleware()).use(function (req, res) {
  // get the user cookies using universal-cookie
  req.universalCookies.get('myCat');
});

Dependents (34)

Package Sidebar

Install

npm i universal-cookie-express

Weekly Downloads

26,720

Version

7.2.2

License

MIT

Unpacked Size

5.55 kB

Total Files

7

Last publish

Collaborators

  • exon