who?
Hello! I’m Víctor (aka Brian3647), a 15-year- old self-taught spanish developer. I love rust & cats, and I hate JS. I’ve been working on this project for ~2.5 months now:
what?
Snowboard (https://github.com/Brian3647/snowboard) is a library written in rust made for creating http/https servers easily. It supports json*, websockets*, TLS*, async*, http request parsing & response generation. *: enabled by feature
why?
Some developers like me prefer a simple API that can be freely extended for your app over a big system of complex proc macros where you have no idea what or how is happening. Snowboard offers a simplistic API that gives freedom of use to the developer without any complication or headache. You code your server just like you want it to be.
should I use snowboard?
Give it a try! From what I’ve seen, some people like a lot this way of coding servers, whereas other people can’t live without . Use it or not, giving a star to the project is always appreciated :)
example program (as of 1.0.3):
use snowboard::{headers, response, Method, Result, Server};
fn main() -> Result {
let server = Server::new("localhost:8080")?;
println!("Listening on {}", server.pretty_addr()?);
server.run(|req| {
if req.method == Method::DELETE {
return response!(method_not_allowed, "Caught you trying to delete!");
}
response!(ok, "Hello!", headers! { "X-Hello" => "World!" })
})
}
Nice job! I’ll have to try this out on my Pi 5.
Ty! I haven’t tested on raspberry pi, so make sure to tell me if anything isn’t working as expected