connect redis typescript usage

Solutions on MaxInterview for connect redis typescript usage by the best coders in the world

showing results for - "connect redis typescript usage"
Deon
13 Sep 2019
1import connectRedis from 'connect-redis';
2import session from 'express-session';
3const RedisStore = connectRedis(session);
4
5 app.use(
6        session({
7            secret: 'secret',
8            store: new RedisStore({host: '127.0.0.1', port: 6379}),
9            resave: false,
10            saveUninitialized: false
11        })
12    );
Helen
22 Aug 2016
1import * as session from 'express-session';
2import * as RedisStore from 'connect-redis';
3
4app.use(session({
5    store: new (RedisStore(session))(options),...
6}));
7      
Jenna
19 Jan 2018
1import * as session from 'express-session';
2import * as connectRedis from 'connect-redis';
3let RedisStore = connectRedis(session);
4
5app.use(session({
6    store: new RedisStore({client: redis.createClient(6379, "localhost")}),...
7}));