I'm starting to work with Meteor and I'm having a lot of trouble with something that should be simple: change the connection string with a mongodb own. I already searched the internet, also for the stackoverflow itself here / a>, here and in other different links but none of them give me a solution that is "politically correct".
From what I saw in the Meteor documentation, I can work with a settings.json
file where it should let me set the variable MONGO_URL manually as well.
{
"env":{
"MONGO_URL": "mongodb://localhost:27017/mydb"
}
}
The problem is that I do not know how to force the meteor to run it at all times, without having to define the --settings
function on the command line because if I generate an application in the production environment, I do not see the --settings as functional, I actually need Meteor to not create a database and return an error when it can not find the database.
EDIT: I was able to make it connect on its own basis when I created a BAT with the commands below:
SET MONGO_URL=mongodb://localhost:27017/mydb
meteor
But I do not agree that this is the only way to get the Meteor to go to another base, and it will not return an error if it does not find the base, but if it does not find it, it will create its own base .