I am rebuilding a legacy PHP application using nodejs and I choose sailsjs after about a week of exploration. Everything was fine until I realised that in sails you only have access to session variables in your controllers. Thus, I cannot make dynamic connections with the model.
The legacy app uses PHP session global variables to connect to different postgresql databases after authentication and I can't seem to find a work around on the web. I have seen similar questions on sails around the web. Any node/sails/database geeks around?
I am thinking of using sails for authentication since it already works and using expressjs to implement services that my sails app would then call by sending db connection params in some form of microservice architecture.
Currenttly running sails on localhost:1337 and my express on localhost:3000. Is this a good way to go about?