// best guess for our main URL (with trailing /) // should improve (return actual server name!) static S mainURL() { O bot = getBot("#1002596"); // System URL Bot if (bot != null) pcall { S url = (S) call(bot, "getBaseURL"); if (nempty(url)) ret addSlash(url); } int port = webServerPort(); ret "http://" + myBestIP() + (port == 80 ? "" : ":" + port) + "/"; }