brawler icon indicating copy to clipboard operation
brawler copied to clipboard

A wrapper of Wrangler to develop and deploy Cloudflare Workers with Deno.

🥊 Brawler

Test Deno Node Wrangler

Brawler is a wrapper of Wrangler to develop and deploy Cloudflare Workers with Deno.

Warning
The project is still under development and not tested extensively yet.

Installation

Use the script installer of deno:

deno install -A --name brawler https://deno.land/x/brawler/cli.ts

Note that wrangler must be also installed and executable.

Usage

Use brawler dev and brawler deploy instead of wrangler dev and wrangler deploy, respectively.

See brawler --help and wrangler --help for details.

Command-line options are passed through for wrangler.

# develop a script locally with hot-reload
touch index.ts
brawler dev index.ts

# publish it
brawler deploy index.ts --name my-brawler-project --compatibility-date 2023-08-15

How it works

Brawler bundles Deno scripts with esbuild and esbuild-deno-loader, and passes them to wrangler. It also watches updates on projects by Deno.watchFs and repeats the procedure for each update.

Examples

  • /examples/hono: Hello-world with Hono framework
    • Hosted version: https://brawler-hono.hasundue.workers.dev

Background

Yes, we have Denoflare (https://denoflare.dev), which is a great project letting you work with a pure Deno environment.

However, Denoflare still lacks some portion of functionality that Wrangler provides, which is why this project exists for now.