baseUrl

Constructs and returns the base URL for the server.

This method composes the base URL using the host and the current port. It ensures that the server is started by checking if the current port is valid.

Return

the base URL of the server in the format "http://host:port".

Throws

if the server is not started.