Skip to content

ccjernigan/kotlin-worker-hello-world

 
 

Repository files navigation

Kotlin hello world for Cloudflare Workers

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.

Wrangler

You will need to install wrangler, e.g. npm install wrangler

Further documentation for Wrangler can be found here.

Gradle

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%