Registry / web-framework / gotham

gotham

JSON →
library0.8.0rscratesunverified

A flexible web framework for Rust that promotes stability, safety, security, and speed.

# Cargo.toml [dependencies] gotham = "0.8.0"
INSTALL
IMPORT
SIG · GOTHAM
G
gotham
web-frameworkrustv0.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Router
use gotham::router::Router;

Creates a simple web server with a GET route.

use gotham::router::Router; use gotham::state::State; use hyper::Response; fn hello_handler(state: State) -> (State, Response<Body>) { let res = Response::new(Body::from("Hello, Gotham!")); (state, res) } fn main() { let router = Router::new().get("/").to(hello_handler); gotham::start("127.0.0.1:8080", router); }
Debug
Known issues
gotchaGotham requires the `hyper` crate as a dependency for HTTP types.
fix
Add `hyper = "0.14"` to your Cargo.toml.
affects: >=0.8.0
Upgrade
Version history
0.8.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
gotham — cargo add gotham · libregistry