mockingpug
Guides

Guides

Wiring mockingpug into a specific framework or the CLI on its own

Framework- and tool-specific setup. Each guide assumes you've already run through Getting Started and have a mock/ directory with at least one entity.

  • React: mocking a REST API in a React SPA via MSW.
  • Next.js: a real App Router Route Handler, backed by the same query resolver.
  • Vite plugin: auto-discovery of mock/api/** as a virtual module.
  • CLI: init, doctor, generate, reset, prune, types.
  • MockProvider & MockDevtools: optional React components for worker lifecycle, live runtime editing, and mock-data highlighting.