Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get port the server is running on. JettyExample | parkergordon.io
import org.eclipse.jetty.server.{NetworkConnector, Server}
object JettyExample{
{...}
def port() = {
val conn = server.getConnectors()(0).asInstanceOf[NetworkConnector]
conn.getLocalPort()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.