Using axum 0.8 now
This commit is contained in:
parent
3b4e61ac14
commit
76c938f1bf
3 changed files with 448 additions and 245 deletions
10
src/main.rs
10
src/main.rs
|
@ -41,14 +41,12 @@ async fn main() {
|
|||
.route("/users/create", post(create_user))
|
||||
.route("/users/auth", get(auth_user))
|
||||
.route("/syncs/progress", put(update_progress))
|
||||
.route("/syncs/progress/:document", get(get_progress))
|
||||
.route("/syncs/progress/{documenti}", get(get_progress))
|
||||
.route("/healthcheck", get(healthcheck));
|
||||
|
||||
// run it with hyper on localhost:3000
|
||||
axum::Server::bind(&"127.0.0.1:3003".parse().unwrap())
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
.unwrap();
|
||||
// run it with hyper on localhost:3003
|
||||
let listener = tokio::net::TcpListener::bind("127.0.0.1:3003").await.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
async fn root() -> &'static str {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue