jinbin1年前22次提交示例
基础示例
- hello world
cargo run --bin hello
- route
cargo run --bin route
路由配置
- body
cargo run --bin body
解析请求体
- header
cargo run --bin header
解析请求头
- rejections
cargo run --bin rejections
错误处理
- futures
cargo run --bin futures
异步操作
- todo
cargo run --bin todo
TODO App
文件服务器
- files
cargo run --bin file
- dir
cargo run --bin dir
- HTML
cargo run --bin handlebars_template
HTML 模板
Websockets
- Websocket
cargo run --bin ws
- Websocket_chart
cargo run --bin ws_chart
ws App
SSE(server Side Events)
- sse
cargo run --bin sse
- sse_chat
cargo run --bin sse_chat
sse App
TLS
热更新
- autoreload
systemfd --no-pid -s http::3030 -- cargo watch -x 'run --bin autoreload'
调试
- tracing
cargo run --bin tracing
示例
基础示例
cargo run --bin hello
cargo run --bin route
路由配置cargo run --bin body
解析请求体cargo run --bin header
解析请求头cargo run --bin rejections
错误处理cargo run --bin futures
异步操作cargo run --bin todo
TODO App文件服务器
cargo run --bin file
cargo run --bin dir
cargo run --bin handlebars_template
HTML 模板Websockets
cargo run --bin ws
cargo run --bin ws_chart
ws AppSSE(server Side Events)
cargo run --bin sse
cargo run --bin sse_chat
sse AppTLS
cargo run --bin tls
热更新
systemfd --no-pid -s http::3030 -- cargo watch -x 'run --bin autoreload'
调试
cargo run --bin tracing