These are chat archives for Automattic/mongoose

Mar 2017
Basavaraj K N
Mar 19 2017 21:16
Hello All, has any one tried using a mongoose model defined in a external module
likenpm install --save <external module>
in your external module you have defined the schema and method to retrieve the object form collection, which you want to use in your express app
The issue is, the external imported module is unable to get hold of the database connection
as it is initialised in the express app not inside the module
what is a good solution for this?