I googled for the whole day but did not found any solution to change default database in meteor for window system. All findings are as follows
MONGO_URL=mongodb://127.0.0.1:27018/meteor meteor
Gives error on window system -
'MONGO_URL' is not recognized as an internal or external command,
Used settings.json as
{
"MONGO_URL":"mongodb://127.0.0.1:27018/meteor"
}
and then meteor --settings ./settings.json
but still it does not pick this mongo setting. Finally in my js file
if (Meteor.isServer){
process.env.MONGO_URL="mongodb://127.0.0.1:27018/meteor"
}
This also not working. Any suggestion in this regard will be highly appreciated.
If I am not mistaken Meteor settings are used only for deployment.
To use another MongoDB than the local one on windows during development, you can create a batch file (*.bat) containing the following commands in your Meteor app folder:
SET MONGO_URL=mongodb://localhost:27017/name_of_the_db
meteor
(Considering that your MongoDB server is listening on localhost:27017 which are the default settings)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With