Skip to content

bashor/kotlin-worker-hello-world

 
 

Repository files navigation

Kotlin hello world for Cloudflare Workers

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

In addition to Wrangler v2.x you will need to install a JDK 8 or newer. The easiest way to do this is using the free Community Edition of IntelliJ IDEA.

Wrangler

Configure the wrangler.toml by filling in the account_id from the Workers pages of your Cloudflare Dashboard.

Further documentation for Wrangler can be found here.

Build & Deploy

After setting up your environment, run the following command:

./gradlew :compileProductionExecutableKotlinWasmJs

That will compile your code into a WebAssembly executable and JavaScript glue code, after which you can run wrangler deploy to push it to Cloudflare:

npx wrangler@latest deploy

Or wrangler dev to test it locally:

npx wrangler@latest dev 

Learn more

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors

Languages

  • Kotlin 59.8%
  • HTML 28.2%
  • JavaScript 12.0%