Skip to content

sampingantech/sampingan-android-webhook

 
 

Repository files navigation

Kotlin hello world for Cloudflare Workers

Your Kotlin code in main.kt, running on Cloudflare Workers

In addition to Wrangler 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

To generate using wrangler

wrangler generate projectname https://github.com/cloudflare/kotlin-worker-hello-world

Further documentation for Wrangler can be found here.

Gradle

After setting up Kotlin per the linked instructions above,

cd projectname
./gradlew buildWorker

That will compile your code and package it into index.js, after which you can run wrangler publish to push it to Cloudflare.

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

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 86.5%
  • HTML 13.5%