Answers for "connect redis typescript usage"

0

connect redis typescript usage

import connectRedis from 'connect-redis';
import session from 'express-session';
const RedisStore = connectRedis(session);

 app.use(
        session({
            secret: 'secret',
            store: new RedisStore({host: '127.0.0.1', port: 6379}),
            resave: false,
            saveUninitialized: false
        })
    );
Posted by: Guest on March-12-2021
0

connect redis typescript usage

import * as session from 'express-session';
import * as RedisStore from 'connect-redis';

app.use(session({
    store: new (RedisStore(session))(options),...
}));
Posted by: Guest on March-12-2021
-1

connect redis typescript usage

import * as session from 'express-session';
import * as connectRedis from 'connect-redis';
let RedisStore = connectRedis(session);

app.use(session({
    store: new RedisStore({client: redis.createClient(6379, "localhost")}),...
}));
Posted by: Guest on March-12-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language