Commit fb88abef authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/image' into 'main'

Feat/image

See merge request !4
parents 95b6428a 8b3c7abd
Pipeline #18133 passed with stages
in 11 minutes and 58 seconds
......@@ -16,3 +16,6 @@ Cargo.lock
# gitlab-runner product
/builds
/.DS_Store
/**/.DS_Store
......@@ -25,9 +25,14 @@ async fn main() -> anyhow::Result<()> {
// TODO: cards服务暂时仅支持单卡查询
let cards = warp::path!("cards" / String)
.map(service::cards_service)
.with(cors.clone());
// TODO: 模块化
let images = warp::path("images")
.and(warp::fs::dir("./images/"))
.with(cors);
warp::serve(deck.or(cards))
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