Search code examples
node.jsmeteorkue

Nodejs: sharing session across meteor and express app running as separate instances


Basically, the user is logged in on the meteor app running on localhost:30000 using the accounts-ui package. Express app is running on localhost:34444.

At some point, a user will need to use the express app (it's actually Kue), and I want to avoid having users login twice.

Both instances are running on same domain, just different ports.

My end goal is to have a job queue management) accessible by a user logged on from another web server instance (in this case meteor), all in the same domain.


Solution

  • Use Redis for that. Fast and easy. If you plan on using Memcached (somehow easier) you might have problems with racing conditions, because memcached have no locking mechanism