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

StackOverflow https://stackoverflow.com/questions/15653387

  •  29-03-2022
  •  | 
  •  

Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top