I am working on an express app. I've separated my route logic outside of the app.js file, which I'm using for config. I'm trying to configure my db in app.js and export this into any route module that needs it.
Here is my db code that i'm pulling into app.js.
db file snippet
app.js file snippet
The output from console.log(db); in the app.js file appears to be an empty object. However, when I reference a function such as console.log(db.create) it returns [ Function ]. Why does console.log(db) return {} and not something like {create: [ Function ].....}