Hacker News new | ask | show | jobs
by bchelli 2348 days ago
Regarding Expo specifically: >>> I have to write bash scripts to create js files. This hurts my brain. There is an issue on Expo's Github about env management https://github.com/expo/expo/issues/83

Now on a more general use case, I guess there are two types of applications: - Client-side (like Expo): I would not store any "secret" for security purposes, just configuration. You seem to use JS for your client-side so use dotenv packages (https://www.npmjs.com/package/dotenv, https://www.npmjs.com/package/dotenv-webpack, etc...)

- Server-side: Depending on your environment, CI, hosting you might have a different solution, sadly not any one-fits-all solution to my knowledge. Heroku provides a pretty straight forward solution, on my production environment I use a configuration management, Chef's Data Bag but you could as well use a service discovery like Consul, Zookeeper, Etcd, etc...

I hope this is a bit helpful.