title: Replace hostname with variable on both php backend and angularjs frontend
body: <p>In my web app, both the php backend and the angularjs frontend has lots of references to their hostname (&quot;https://mydomain.xyz&quot;).</p>
  <p>It looks really repetitive, and I would like to replace it with a variable.</p>
  <p>Is there a variable for the hostname that I could use all through my code both on the front end on the on the back end?</p>
  <p>Thank you!</p>