An official way to get a Meteor app's ID?


#1

I could use could read process.cwd()+'/.meteor/.id', but I’m not sure that’s reliable. Is there an official way to get it?


#2

I’m not sure how official it is, but you can use process.env.APP_ID


#3

@robfallows That doesn’t exist for me in my process.env. Having process.env.METEOR_APP_ID would definitely be nice.


#4

In development mode, the appId is accessible from the __meteor_runtime_config__.appId variable.

For more info see my StackOverflow question and answer.