Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emrecancorapci/krustie

A simple and easy-to-use backend framework for Rust.
https://github.com/emrecancorapci/krustie

backend http http-server rust server

Last synced: about 6 hours ago
JSON representation

A simple and easy-to-use backend framework for Rust.

Awesome Lists containing this project

README

        

# Krustie - A Basic Backend Framework

[github](https://github.com/emrecancorapci/krustie)
[crates.io](https://crates.io/crates/krustie)
[docs.rs](https://docs.rs/krustie)
[build status](https://github.com/emrecancorapci/krustie/actions?query=branch%3main)

Krustie is a simple backend framework. It is designed to be a easy-to-use HTTP web server that can be used for a variety of purposes. Krustie's error-proof design aims to make it harder to write bugs.

> Krustie is still in the early stages of development and ***is not yet ready for production use***. The API is subject to change and there may be bugs or missing features.

## Features

- Router with support for parameter and query string parsing
- Middleware support for routers and endpoints
- Minimal testing support
- JSON data parsing and serialization (using the `serde` library)

### Built-in Middlewares

- Static file serving
- Rate limiting
- Gzip compression

## Start your server

```rust
use krustie::{ Router, Server, StatusCode };

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

router.get("/", |_, res| {
res.status(StatusCode::Ok).body_text("Hello World!");
});

server.use_handler(router);

server.listen(8080);
}
```

## Contributing

All contributions are welcomed. Please open an issue or a pull request to report a bug or request a feature.