I would like to know how can we detect whether meteor is running in development or production environment?
Thanks
You can use process for that, another approach is to use fs and check a file which you put in your dir which is different depending on the environment your application is in.
I think the best approach would be to use process.env
and checking out COMPUTERNAME
.
Use "meteor_runtime_config.ROOT_URL"
This returns ROOT_URL environment variable.
It's a simplest way to detect environment.
You can set this value in .bash_profile, or .profile
export ROOT_URL=http://YOURDOMAIN.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With