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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -