//! Nimble - 一个简单优雅的 Rust Web 框架
//!
//! # 示例
//! ```
//! use nimble::{Router, get, post, Html, Json, Redirect};
//!
//! #[tokio::main]
//! async fn main() {
//!     let app = Router::new()
//!         .route("/", get(|_| Html("<h1>Hello World</h1>".to_string())))
//!         .route("/json", post(|params| Json(["张三", "李四", params.get("name").unwrap_or("王五")])));
//!         .route("/baidu", get(|_| Redirect("https://www.baidu.com"))
//!
//!     app.run("127.0.0.1", 3000).await.unwrap();
//! }

#![allow(dead_code)]

mod handler;
mod response;
mod router;
mod server;

pub use handler::Handler;
pub use response::{File, Html, IntoResponse, Json, Redirect, Text};
pub use router::{MethodHandler, Router, get, post, post_json};

// 重新导出常用类型
pub use hyper::{Method, StatusCode};
pub use serde_json::Value;

#[allow(non_snake_case)]
pub fn Nimble() -> Router {
	Router::new()	
}
