Skip to content

Scala hello world for Cloudflare Workers

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

cloudflare/scala-worker-hello-world

Scala hello world for Cloudflare Workers

Your Scala code in Main.scala, running on Cloudflare Workers

In addition to Wrangler you will need to install the Scala build tool sbt, including a JDK.

Wrangler

To generate using wrangler

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

Further documentation for Wrangler can be found here.

sbt

After installing sbt per the linked instructions above,

cd projectname
sbt fullOptJS

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

If you just want to check for errors during development without taking the time to package, running sbt ~compile will watch for filesystem changes and recompile. For more information, see the sbt docs

For more information on how Scala translates to Javascript, see the Scala.js docs.

About

Scala hello world for Cloudflare Workers

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Languages