Skip to content

Commit

Permalink
fix: print host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
tuddman committed Jun 5, 2024
1 parent 2e8bc3e commit ca68496
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ fn verify_hmac(
async fn main() -> std::io::Result<()> {
std::fs::create_dir_all("uploads").unwrap();

let host = "0.0.0.0:5558";
println!("Starting server at: {}", host);
HttpServer::new(move || {
App::new()
.service(web::resource("/upload").route(web::post().to(upload_file)))
.service(web::resource("/files/{id}").route(web::get().to(get_file)))
})
.bind("0.0.0.0:5558")?
.bind(host)?
.run()
.await
}
Expand Down

0 comments on commit ca68496

Please sign in to comment.