3 ms·
Perhaps it used to, but today `wrangler preview` previews your worker in the cloud using the "preview service", and `wrangler dev` uses a private tunnel to an e
by jacobwg 5y ago
Perhaps it used to, but today `wrangler preview` previews your worker in the cloud using the "preview service", and `wrangler dev` uses a private tunnel to an edge node to serve local development requests [0]. Neither of them use Node.
> wrangler dev is a command that establishes a connection between localhost and an edge server that operates your Worker in development. A cloudflared tunnel forwards all requests to the edge server, which continuously updates as your Worker code changes. This allows full access to Workers KV, Durable Objects, etc. This is a great way to easily test your Worker while developing.
[0] https://developers.cloudflare.com/workers/cli-wrangler/commands#dev https://developers.cloudflare.com/workers/cli-wrangler/comma...
- kentonv 5y agoThat's correct, and it has always worked that way. Wrangler has never used Node to run Workers. Miniflare is the tool that runs locally with Node.
- eli 5y agoThanks!
- eli 5y agoAh that's right. I was misremembering; it was the jest test suite that ran with node and had to contend with differences between node and Workers' V8 engine. I don't suppose anyone's come up with anything better?