2 ms·
That's one strategy. Having something like `API_URL=https://api.foo.bar/v1 https://api.foo.bar/v1` works equally well for 12 factor apps, and gives you the adde
by 9dev 5y ago
That's one strategy. Having something like `API_URL=https://api.foo.bar/v1 https://api.foo.bar/v1` works equally well for 12 factor apps, and gives you the added benefit of transparently pointing to test hosts or staging versions running elsewhere.
- weitzj 5y agoYeah. I would have this env var inside my reverse proxy to have it 12-factor app compatible. And I guess your solution as well? And you have some templating mechanism to replace the absolute variable on the fly? I would use a mix of your solution, i.e. allow the Java script client to be configured with either absolute or relative urls in case one needs to point the client elsewhere + reverse proxy