I pulled some of the admin / management functions from the Meteor app into another new one to reduce the size of the client application / reduce access restriction. I also have MongoDB installed separately on localhost and in production.
I could run each application on separate ports and connect to database environment variables when starting applications:
# App 1 MONGO_URL=mongodb://localhost:27107/appDB meteor
Of course, I would like to use settings.json in the root of the project to pass these variables instead of specifying them (here settings.json for App 2):
{ "env": { "PORT": 4000, "MONGO_URL": "mongodb://localhost:27017/appDB" } }
And using meteor run --settings settings.json to pass these variables. However, Meteor does not recognize the settings file. Any ideas I might have made a mistake in?
Update 1: @Apendua was kind enough to tell me that settings.json just doesn't support this behavior. Instead of bash aliases.
Update 2: @AshHimself pointed out that Galaxy can recognize environment variables this way, but the main Meteor docs werenโt terribly clear if it worked in a local environment.
source share