Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @nest-middlewares/cookie-session with all npm packages installed. Try it out:

require("@nestjs/common/package.json"); // @nestjs/common is a peer dependency. var cookieSession = require("@nest-middlewares/cookie-session")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@nest-middlewares/cookie-session v6.0.0

NestJS Middleware for Cookie Session

Nest Middlewares - Cookie Session

Coverage Status

This is the Nest Middleware wrapper around cookie-session.

Installation

@nest-middlewares/cookie-session is available from NPM. You can install it with this command:

npm install --save @nest-middlewares/cookie-session

Usage

import { CookieSessionMiddleware } from '@nest-middlewares/cookie-session';

@Module(...)
export class MyModule {
    configure(consumer: MiddlewaresConsumer) {
        // IMPORTANT! Call Middleware.configure BEFORE using it for routes
        HelmetMiddleware.configure( /* options as per helmet docs */ )
        consumer.apply(CookieSessionMiddleware).forRoutes( /* your routes */ );
    }
}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free