TypeScript compiler running in a Cloudflare Worker. Proof of concept.
Compiles TS to JS on the edge, executes in a sandboxed dynamic worker, returns result.
Demo: https://workert-compiler-mmkal.iterate.workers.dev
curl -X POST https://workert-compiler-mmkal.iterate.workers.dev \
-d '{"code": "async function codemode() { return 1 + 1 }"}'
# {"success":true,"result":2}Or visit the URL in browser for a simple UI.
bun install
bun run deployRequires Alchemy and Cloudflare credentials.
bun install
bun test # run tests
bun dev # start local dev server- Bundles
@ts-morph/bootstrap+ TypeScript compiler with Bun - Compiled code runs in isolated worker with no network access
Apache 2.0