Mobile app version of vmapp.org
Login or Join
Cody1181609

: Environment specific client-side config file I'm developing a WebRTC app where the endpoints along with some other options are different for production and development. I was handed this project

@Cody1181609

Posted in: #Clients #Configuration #SiteDeployment

I'm developing a WebRTC app where the endpoints along with some other options are different for production and development. I was handed this project so one of codebases uses Nodejs and the other uses plain html, css and js. I know that Nodejs has some modules that provide environment specific configs (e.g. Config) but they are all server-side.

My current solution is to have a config.js file in both branches which is statically served to the client. This however doesn't feel like best practice, and managing them with Git is pretty sketchy since I want the config.js file to be included in the repository but I don't want to have them changed when merging branches.

What are the most common ways to pass environment specific configuration options to the client in a web app?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody1181609

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme