dont remember lol
cargo devel CI / cargo CI (push) Successful in 4m38s
Details
cargo devel CI / cargo CI (push) Successful in 4m38s
Details
This commit is contained in:
parent
3e27923d14
commit
88dd0f7d9c
|
@ -12,5 +12,7 @@ async fn main() {
|
||||||
debug!("spawning data_processing task: {store:#?}");
|
debug!("spawning data_processing task: {store:#?}");
|
||||||
tokio::spawn(data_processing(store.clone()));
|
tokio::spawn(data_processing(store.clone()));
|
||||||
info!("starting webserver");
|
info!("starting webserver");
|
||||||
warp::serve(routes(store)).run(([127, 0, 0, 1], 3030)).await;
|
warp::serve(get_store(store))
|
||||||
|
.run(([127, 0, 0, 1], 3030))
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ pub fn get_store(store: Store) -> impl Filter<Extract = impl Reply, Error = Reje
|
||||||
warp::path!("api" / "v1" / "store")
|
warp::path!("api" / "v1" / "store")
|
||||||
.and(warp::get())
|
.and(warp::get())
|
||||||
.and(with_store(store))
|
.and(with_store(store))
|
||||||
// .and(warp::body::content_length_limit(2 << 13))
|
|
||||||
.then(|store: Store| async move {
|
.then(|store: Store| async move {
|
||||||
info!("GET /api/v1/store");
|
info!("GET /api/v1/store");
|
||||||
warp::reply::json(&store.get().await)
|
warp::reply::json(&store.get().await)
|
||||||
|
|
Loading…
Reference in New Issue