I'm using Angular8, Java8, Maven, and Tomcat 8.0 and I have three environments that I would like to deploy my application with a single build. Angular is an application that handles "One build, one environment". It is possible to tweak it to run more environment at once but to me, it doesn't make sense why this works.
Normally, in a URL you put localhost or any other URL and build the angular project so the dist file will be saved with the chosen URL. This time I just use .. (double dots) e.g. ../rest/endpoint and it is also working in many environments. The double dots trick works if I build the angular project and the URL is dynamically set. So with the double dots trick, my application can run on www.website.com/rest/endpoint and also on localhost:8080/rest/endpoint.
Can someone explain to me this double dots trick?