planetwars.dev/planetwars-server/src/main.rs

17 lines
324 B
Rust
Raw Normal View History

2021-12-29 16:11:27 +01:00
use std::net::SocketAddr;
2021-12-30 11:45:59 +01:00
extern crate planetwars_server;
2021-12-29 16:11:27 +01:00
extern crate tokio;
#[tokio::main]
async fn main() {
2021-12-30 11:45:59 +01:00
let app = planetwars_server::app().await;
2021-12-29 16:11:27 +01:00
let addr = SocketAddr::from(([127, 0, 0, 1], 9000));
2021-12-13 15:43:47 +01:00
2021-12-29 16:11:27 +01:00
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
2021-12-13 15:43:47 +01:00
}