How to access next options and env.vars inside application at Server and Client?:
MOBILE_ROOT_URL
MOBILE_DDP_URL
--mobile-server argument
I’m sorry if this question is obvious, but for some reason, I cannot figure this out. I was 100% sure it will be placed into __meteor_runtime_config__, but it isn’t.
Just guessing: I think the —mobile-server option is not really accessible in client code as it is used at compile time by cordova. After that it is the root url i guess. Maybe those env vars behave the same. The client code in the app connects to a localhost 127.* ip webserver once it is started and does not need to know these settings.
You should be able to get the mobile-server config on the server with process.env.MOBILE_ROOT_URL at startup and on the client with meteor_runtime_config.ROOT_URL in Meteor.isCordova mode.