Dynamically uses hostname and app name in server URL

I haven't worked out how to load the port programatically, yet