Start the Server

Now we are ready to start the LPFCP server!

You just need to create an object of the created in previous section Class and expose it using LPFCP Java library:

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)
}

Now our calculator app is exposed to the network!

Last updated