0
I’m starting to work with the Meteor and I’m having a hard time with something that should be simple: changing the connection string with a mongodb itself. I’ve searched the internet, also for stackoverflow itself here, here and other different links but none of them gives me a solution that is "politically correct".
From what I saw in the Meteor documentation, I have how to work with a file settings.json
where it should let me define the variable MONGO_URL manually like this.
{
"env":{
"MONGO_URL": "mongodb://localhost:27017/mydb"
}
}
The problem is that I don’t know how to force the Content to run it always, without having to define the function on the command line --settings
because if I generate an application in a production environment, I don’t see --Settings as functional, I actually need Meteor not to create a database and return an error when it doesn’t find the database.
EDIT: I managed to get it to connect on a base of its own 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 Meteor to access another base, besides it will not return me an error if I do not find the base, on the contrary, if I do not find it will create its own base.