Skip to content
Discussion options

You must be logged in to vote

Hi @khentonx
It would work the same as the typescript example, just remove the typescript interface:

import nextAppSession, {promisifyStore} from 'next-app-session';
import Redis from 'ioredis';
import RedisStoreFactory from 'connect-redis';

export const session = nextAppSession({
  name: 'EXAMPLE_SID',
  secret: 'secret goes here' ,
  // Optional: Assign Redis store with connection details
  store: promisifyStore(
    new RedisStore({
      client: new Redis({
        host: 'localhost',
        port: 6381
      }),
      prefix: 'exampleapp:'
    })
  )
}); 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by majidkuhail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants