Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.01 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.01 KB

Cloudflare Worker deno server emulator

This is a experiment to replace wrangler preview --watch with Deno.

This idea is based on that Deno has the same api as Service Workers:

That would be harder using Node, cause would need polyfill for all those objects.

HOW TO

Create a entry file entry.deno.ts that imports deno-server followed by Cloudflare Worker entry file.

import "server.deno.js"
import "./entry.worker.ts"

And run using denon to watch for file changes:

denon run --allow-net entry.deno.ts

TODO

  • Configure PORT
  • bin script to run against entry.worker.ts
  • Make typescript version work