Your Kotlin code in Application.kt, running on Cloudflare Workers.
You will need to install Kotlin, including a JDK and support for Gradle projects. The easiest way to do this is using the free Community Edition of IntelliJ IDEA.
You will need to install wrangler, e.g. npm install wrangler
Further documentation for Wrangler can be found here.
After setting up Kotlin per the linked instructions above,
./gradlew assemble
That will compile your code and package it into a JavaScript executable, after which you can run wrangler dev
to start a localhost server for testing.
To publish to Cloudflare, run wrangler publish
For more information on interop between Kotlin and Javascript, see the Kotlin docs. Regarding coroutines, see this issue and workaround