Could you elucidate on why using
# from the server
mongoose = server.pack.plugins['hapi-mongoose-db-connector'].mongoose
# or from a plugin
mongoose = plugin.plugins['hapi-mongoose-db-connector'].mongoose
is a bad idea and how just requiring mongoose gives you the configured mongoose connection?
Could you elucidate on why using
is a bad idea and how just requiring mongoose gives you the configured mongoose connection?