Saturday 28 January 2017

Saving a socket id to session?

I'm building a simple API using socket.io and express-session middleware, however I'm a bit lost as to how to save each individual socket's id to the session so that I can access it from the request object of any route.What's the best way of going about this so that I can implement, for example, a progress bar on file uploads (I'm already parsing the forms fine and have my back-end emitting on progress. I'm using session-file-store for now if that's relevant.Appreciate the help!

Submitted January 28, 2017 at 12:19PM by ajc820

No comments:

Post a Comment