WebApplication.Port
From Xojo Documentation
Read-Only Property (As Integer )
The port number used to communicate with the standalone web app when it is built and deployed.
Notes
In addition to being set in the Build Settings for the web app, this value can also be set at launch time by appending the --port command line parameter.
Usage:
MyApp --port=9000
On macOS and Linux, port numbers below 1024 (including the common port 80) require elevated permissions, so you will have to start the web app using the "sudo" command.