javascript - sails.js - Using models with a custom service instead of a connection -


i'm working in bit of weird situation need create api connects different database based on supplied parameters in request. write api in sails.js because i've worked bit (as opposed other frameworks).

my problem cannot make dynamic connection in it, connections loaded upon lifting.

i've found few related answers. first 1 https://stackoverflow.com/a/34845674/7131845, says use custom service handle connection dynamically , suggests use of models it. , second 1 one: https://stackoverflow.com/a/38458390/7131845 pretty that.

i did myself: i've created service handles connection database provided parameters, issue don't know how connect model work service instead of connection/adapter set. appreciate help.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -