I have a mongodb database that I've connected to like so:
(let [uri (config-keys :mongoURI)
{:keys [conn db]} (mg/connect-via-uri uri)])
In Node.js with mongoose, one can do mongoose.Promise = global.Promise
, to connect to the database only once and then use it from any of the files in the global namespace. How do I do this with monger so that I don't have to repeat the code above in each file that uses the database and instead connect with it only once?