chyabrung-cli 0.2.3

The `chy` command line tool for Chyabrung: scaffolding, dev server with hot reload, builds, generators, migrations and one-command deploys
1
2
3
4
5
6
7
8
9
10
11
//! # Middleware: code that runs before or after your handlers
//!
//! Use middleware for things many routes share: checking an API key,
//! adding a header, logging, timing. Chyabrung already includes logging,
//! CORS, rate limiting, timeouts, security headers and authentication
//! (see `src/lib.rs`), so this folder starts empty.
//!
//! - Create one with `chy make:middleware EnsureAdmin`. It is added to this
//!   file for you.
//! - Use it for every route in `src/lib.rs` with `.middleware(...)`, or for a
//!   group of routes in `src/routes/web.rs` or `src/routes/api.rs` with `r.middleware(...)`.