I have a few databases and didn\'t want to create separate user accounts for each one. MongoDB supports the notion of authenticating access to a database using accounts defined
This can also can be simplified by modifying the connection string in the mongodb itself:
For eg: mongodb://username:password@IP:Port/mydbname?authSource=admin since mongoose supports this connection string provided by mongodb https://docs.mongodb.com/manual/reference/connection-string/#urioption.authSource