Crate cataclysm[−][src]
Expand description
Cataclysm: A simple http framework
Cataclysm is a small personal project, an http framework influenced by actix-web
, and built over tokio
. A minimal working example is the following
extern crate cataclysm;
use cataclysm::{Server, Branch, http::{Response, Method}};
async fn index() -> Response {
Response::ok().body("Hello, World!")
}
#[tokio::main]
async fn main() {
let server = Server::builder(
Branch::new("/").with(Method::Get.to(index))
).build();
server.run("localhost:8000").await.unwrap();
}
Modules
Contains the specific functionality for http interaction
Structs
Main cataclysm structure for route handling
Http Server instance
Enums
Pipeline type, contains either a layer or the core of the pipeline