Commit 40c0c315 authored by Chunchi Che's avatar Chunchi Che

add images route

parent 95b6428a
Pipeline #18129 passed with stages
in 11 minutes and 10 seconds
......@@ -16,3 +16,6 @@ Cargo.lock
# gitlab-runner product
/builds
/.DS_Store
/**/.DS_Store
......@@ -27,7 +27,10 @@ async fn main() -> anyhow::Result<()> {
.map(service::cards_service)
.with(cors);
warp::serve(deck.or(cards))
// TODO: 模块化
let images = warp::path!("images").and(warp::fs::dir("./images/"));
warp::serve(deck.or(cards).or(images))
.run(SocketAddr::from_str(SERVE_ADDR)?)
.await;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment