pillow

Crates.iopillow
lib.rspillow
version0.4.3
sourcesrc
created_at2022-11-04 03:12:51.421602
updated_at2023-06-10 20:29:56.55953
descriptionA web framework for rust
homepagehttps://github.com/SummaryPuppet/pillow_framework
repositoryhttps://github.com/SummaryPuppet/pillow_framework
max_upload_size
id704789
size6,212
(SummaryPuppet)

documentation

https://github.com/SummaryPuppet/pillow_framework

README

Pillow Framework

Is a web framework for rust

Getting started

Add dependency

[dependencies]
pillow = "0.3.0"
tokio = {version = "1.23.0", features = ["full"]}

Simple Server

use pillow::http::*;

#[controller(method = "GET", path = "/")]
fn index(){
  Response::text("hello")
}

#[tokio::main]
async fn main() {
  let mut router = MainRouter::new();

  router.add_route(route!(index {}));
  router.get("/users", |_request| Response::text("users"));

  let server = Server::default();

  server.run(&router).await:
}

Documentation

Lincese

MIT Lincese

Contribution

Commit count: 32

cargo fmt