3 ms·
Alternatively, if you’re looking to create a web application but only expose it through an HTTP API, you can simply choose an HTTP router like Routerify [1] to
by rmdashrfstar 6y ago
Alternatively, if you’re looking to create a web application but only expose it through an HTTP API, you can simply choose an HTTP router like Routerify [1] to route HTTP requests to a stateful handler and any number of middlewares.
I’m coming from Go and learning backend web dev in Rust, and this crate has been a wonderful replacement for the Go library “Chi” [2].
This comes in handy when your frontend is a SPA (e.g. Vue, React) and it’s just updating state via API calls
[1] https://github.com/routerify/routerify https://github.com/routerify/routerify
[2] https://github.com/go-chi/chi https://github.com/go-chi/chi