- Where are datasources setup? Is boot/datasources.js the right place?
- It's not clear when figuring this out, that the model's run before the boot scripts, therefore datasource doesn't exist when trying to attach in model.js
- It's not clear that the named datasource also needs to be defined in the datasources.json
- Should they be setup in the module.exports callback or immediately?
- Which API should be used to setup, and what are the differences?
- app.dataSource()
- Can a mongodb datasource be defined in datasources and just the credentials added programmatically? Does datasources.json override programmatic or vice versa?
- Can a datasource added programmatically be associated with models using model-config.json? What order is this done in, in comparison to when the code executes model.js or programmatical setup of datasource?
- How should the datasource instance be defined / exported / imported / accessed from the model.js file?
A repository for reproducing LoopBack community issues.