krustie

Crates.iokrustie
lib.rskrustie
version0.1.7
sourcesrc
created_at2024-06-07 22:07:31.684149
updated_at2024-07-15 19:23:55.599598
descriptionKrustie is a backend framework written in Rust. Currently, it is a work in progress and not yet ready for production use.
homepagehttps://github.com/emrecancorapci/krustie
repositoryhttps://github.com/emrecancorapci/krustie
max_upload_size
id1265212
size66,191
Emre Can Çorapçı (emrecancorapci)

documentation

README

Krustie - A Basic Backend Framework

github crates.io docs.rs build status

Krustie is a backend framework written in Rust. It is currently a work in progress and not yet ready for production use. This project serves as a personal learning experience, and contributions or feedback are welcome.

Features

  • Stackable Router
  • Middleware support
  • JSON parsing (serde_json)

Builtin Middlewares

  • Static file serving
  • Gzip encoding (flate2)

Start your server

use krustie::{ response::ContentType, Router, Server, StatusCode };

fn main() {
    let mut server = Server::create();
    let mut router = Router::new();

    router.get(|_, res| {
        res.status(StatusCode::Ok).body(b"Hello World!".to_vec(), ContentType::Text);
    });

    server.use_handler(router);

    server.listen((127, 0, 0, 1), 8080);
}

Contributing

As an inexperienced developer contributions will be welcomed. Please open an issue or a pull request.

Commit count: 82

cargo fmt