@nest-middlewares/express-session
v10.0.1
Published
NestJS Middleware for Express Session
Downloads
4,791
Readme
Nest Middlewares - Express Session
This is the Nest Middleware wrapper around express-session.
Installation
@nest-middlewares/express-session
is available from NPM. You can install it with this command:
npm install --save @nest-middlewares/express-session
Usage
import { ExpressSessionMiddleware } from '@nest-middlewares/express-session';
@Module(...)
export class MyModule {
configure(consumer: MiddlewaresConsumer) {
// IMPORTANT! Call Middleware.configure BEFORE using it for routes
ExpressSessionMiddleware.configure( /* options as per express-session docs */ )
consumer.apply(ExpressSessionMiddleware).forRoutes( /* your routes */ );
}
}