hghs
hghs copied to clipboard
Idea: Target idiomatic JS instead of NodeJS to be able to run on any environment
Hi, I was wondering how possible would it be to not depend on NodeJS specific APIs directly and instead write idiomatic JS with a small abstraction layer similar to what Remix does with their "server adapters" here: https://remix.run/docs/en/v1/other-api/adapter
That would allow to deploy to all the new cloud on the edge that don't support NodeJS (e.g. cloudflare, vercel, fly.io, ...). It would also make it possible to use other JS runtimes like Deno or Bun, and potentially even run natively on mobile or desktop with something like react native or electron.
If you think that would be useful then it would be easier to make that move earlier than later before the codebase gets much bigger.