Miniflare
Miniflare is a simulator for developing and testing Cloudflare Workers ↗. It's written in TypeScript, and runs your code in a sandbox implementing Workers' runtime APIs.
- 🎉 Fun: develop Workers easily with detailed logging, file watching and pretty error pages supporting source maps.
- 🔋 Full-featured: supports most Workers features, including KV, Durable Objects, WebSockets, modules and more.
- ⚡ Fully-local: test and develop Workers without an Internet connection. Reload code on change quickly.
Get Started
GitHub
NPM
These docs primarily cover Miniflare specific things. For more information on runtime APIs, refer to the Cloudflare Workers docs.
If you find something that doesn't behave as it does in the production Workers environment (and this difference isn't documented), or something's wrong in these docs, please open a GitHub issue ↗.
- Get Started : Install and configure the Miniflare API to dispatch events and test Cloudflare Workers locally.
- Writing tests : Write integration tests against Workers using Miniflare.
- Core : Core Miniflare features for testing Cloudflare Workers, including fetch events and compatibility settings.
- Developing : Development tools for Miniflare, including debugger support and live reload for Cloudflare Workers.
- Migrations : Review migration guides for specific versions of Miniflare.
- Storage : Configure and manage local storage simulators in Miniflare for Workers bindings like KV, R2, and D1.