Search code examples
node.jsweb-workerhttpservercloudflare-workers

How to let script on Cloudflare Workers running in localhost


I installed nodejs on my computer, and I want to run cloudflare workers scripts on localhost or VPS. It seems like use Web Worker API to pass request.

How can I set up my nodejs environment?


Solution

  • You can use Miniflare to run a Cloudflare Worker locally for testing: https://miniflare.dev/