Miniflare: we can use Cloudflare workers directly and use Miniflare as a development server which simulates a real worker environment.
Hono: it's a platform agnostic that can run on Cloudflare workers, AWS lambda, Vercel...so it'd allow us to easily move to a different platform. It's meant to run on edge but it also supports running on Node.
I'm currently testing out the first option and it works when I build the worker but not when I build the local server because of some weird errors:
[ERROR] Could not resolve "node:util"
.yarn/cache/@fastify-busboy-npm-2.1.0-960844a007-f22c1e5c52.zip/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js:4:25:
4 │ const inherits = require('node:util').inherits
╵ ~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "node:util" here because it's not listed as a
dependency of this package:
.pnp.cjs:659:31:
659 │ "packageDependencies": [\
╵ ~~
The package "node:util" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
There are actually two options:
I'm currently testing out the first option and it works when I build the worker but not when I build the local server because of some weird errors: