start

fun start(port: Int = 8080, host: String = "0.0.0.0", routeBlock: Application.() -> Unit)

Starts the web server with specified configurations.

Parameters

port

The port on which the server will listen for incoming requests (default is 8080).

host

The host address to bind the server to (default is "0.0.0.0" for all available interfaces).

routeBlock

A block of code where you define routes for handling HTTP requests.