Skip to content

Commit

Permalink
wip: cont on http interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cablehead committed May 31, 2024
1 parent afb46d6 commit e8a0795
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let args = Args::parse();
let store = Store::spawn(args.path);
if let Some(addr) = args.http {
let _ = xs::http::serve(store.clone(), &addr).await;
let store = store.clone();
tokio::spawn(async move {
let _ = xs::http::serve(store, &addr).await;
});
}
xs::api::serve(store).await
// TODO: graceful shutdown
Expand Down

0 comments on commit e8a0795

Please sign in to comment.