Skip to main content

Crate mockd

Crate mockd 

Source
Expand description

Mockd — a lightweight standalone mock HTTP server.

Mockd lets you stand up a realistic HTTP API from a declarative YAML configuration, without writing any code. It is designed for local development, integration tests and CI/CD pipelines.

§Module overview

  • config — domain models and YAML configuration loading.
  • router — request matching against the configured routes.
  • template{{path.id}} / {{query.x}} / {{header.y}} rendering.
  • server — the Axum HTTP layer.

Re-exports§

pub use config::Config;
pub use config::ConfigError;
pub use router::Match;
pub use router::Router;
pub use router::RouterError;
pub use server::build_app;
pub use server::Server;
pub use server::ServerError;

Modules§

config
Domain models and YAML configuration loading.
router
Route matching.
server
HTTP server layer (Axum).
template
Minimal template rendering for mockd responses.