Is it possible to select a database that MongoDB should use on startup in the mongorc.js?
use dbname
is not functioning. This is a Non-JavaScript macro.
Is it possible to select a database that MongoDB should use on startup in the mongorc.js?
use dbname
is not functioning. This is a Non-JavaScript macro.
The db-name is an option when starting the mongo javascript shell.
mongo
mongo --help
You can also do something similar like this from the js file
db = db.getSiblingDB("dbname")