Created
October 7, 2021 02:45
-
-
Save alex-hladun/de03e658773dfe6b2102de74ce3ccdd2 to your computer and use it in GitHub Desktop.
Connecting to socket.io-redis-adapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connectToHostedRedis = (redisEndpoint: string) => { | |
this.pubClient = new RedisClient({ host: redisEndpoint, port: 6379 }); | |
const subClient = this.pubClient.duplicate(); | |
this.io.adapter(createAdapter({ pubClient: this.pubClient, subClient })); | |
this.sessionStore = new RedisSessionStore(this.pubClient); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment