0
votes

I have made the datasources.integration.json environment file along with datasources.json file

When I run the command NODE_ENV=integration node .

I get an error for a table which is in localhost, which means loopback is falling back to the default datasources.json

I am clueless as to why it is not taking the settings from datasources.integration.json?

1
If you try debugging (loopback.io/doc/en/lb3/Setting-debug-strings.html) do you see anything? - Raymond Camden

1 Answers

0
votes

Okay, solved it, actually I was making a query request to bring in the constants from a database table, before app.start() in server.js, which was causing the issue, just moved that block of code after app.start() and the issue was resolved. :)