Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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
        })
    );
 
PREVIOUS NEXT
Tagged: #connect #redis #typescript #usage
ADD COMMENT
Topic
Name
5+3 =