We have a legacy app that has a MySQL database. It's backend is currently written in PHP.
We are now revamping the backend and building a backend in node.js. The tech team has decided to use sails.js as their framework for building this backend.
Sails.js by default uses Waterline (ORM).
What we want is to be able to connect to our legacy MySQL database and drop orm support in our sails app.
When initializing a new sails app, I passed a without
option to opt out of orm in my app.
Now, I am confused as to where (and how) should I connect to the legacy MySQL database in a single place and make that connection available to all the controllers/action files that we will have.
Do I still have to use sails-mysql, or should I use any other adapter that helps me connect to the database? Where should this code live? Inside a helper method ?
Any help would be appreciated!