v1.0.0-beta-002
Pre-release
Pre-release
·
29 commits
to main
since this release
Hey there!
We've added support for Cloudflare workers in this beta release
here's a short example
open Bix
open Bix.Router
open Bix.Handlers
open Bix.Cloudflare
let private routes =
Router.Empty
|> Router.get ("/", sendHtml "<h1>Hello, World!</h1>")
|> Router.get ("/text", sendText "Hello World!")
|> Router.get ("/json", sendJson {| message = "Hello, World!" |})
let private worker = Worker.Empty |> Worker.withRouter routes |> Worker.build
// ES Modules need to export the fetch handler as per cloudflare documentation
Fable.Core.JsInterop.exportDefault workerit would be nice if you could give the cloudflare worker support a try, We're looking forward to see what you can do with it!
Bug Fixes
- Fix 505 Errors when hitting 404 routes
New Features
- Add Support for Cloudflare workers!