// 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) + "/"; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002642 |
Snippet name: | mainURL |
Eternal ID of this version: | #1002642/1 |
Text MD5: | 55afb8936b80870573c119f53d3a3221 |
Author: | stefan |
Category: | nl bots |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-03-14 17:23:05 |
Source code size: | 396 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 738 / 681 |
Referenced in: | [show references] |