lpfcpServer()

As shown in Start the Server, there is a built-in function to create a Ktor server very simply:

fun main() {
    // Creating a calculator object like always
    val calculator = CalculatorImpl()

    // Starting LPFCP Server, which exposes all annotated calculator functions
    lpfcpServer(processor = calculator, port = 8080)
        .start(wait = true)
}

Last updated