Share session among Express and SocketIo #4092
Unanswered
hasham7861
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to Share 1 session between Express and SocketIo
Context: It took me sometime to figure out how to share a session between express app and socket.io. So I thought I share this simple code repo to contribute to this awesome community.
Note: this solution only works if the express and socket.io are hosted on single server and on one process. if you are using multiple processes. Then look into sticky sessions.
Now, how did I accomplished to share the session between express and socketio:
Technologies used: Vue, Express, Socket.io, and Redis.
Checkout the repo: https://github.com/hasham7861/express-socketio-session.git
Contribution: Feel free to fork the repo, favourite, or provide any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions