Using Cloudflare Workers locally

Is it possible to run Cloudflare Workers locally on your machine, so you can reach localhost endpoints, instead of using the playground? Or would I need to setup a server before I can do such things?

I want to create a new Cloudflare Workers project using KV store.

It used to be possible:

It’s now recommended to use wrangler dev instead (which requires internet)

Okay, so you’re saying it’s not possible?

Not reliably, API’s have/will change and features will/have been added.

1 Like

Doesnt wrangler dev still run the script on the cloud? I. E. you can’t do a fetch to a 10.x.x.x or 192.x.x.x address.

Correct, it requires internet so won’t work locally.