blob: 002bfe88041040bba814c3319aed315c61066020 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use whirl::server::auto::server::AutoServer;
use std::error::Error;
use whirl::server::room::server::RoomServer;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
dotenv::dotenv().ok();
pretty_env_logger::init();
let mut threads = vec![];
threads.push(tokio::spawn(async move {
let _ = AutoServer::new("0.0.0.0:6650").await;
}));
threads.push(tokio::spawn(async move {
let _ = RoomServer::new("0.0.0.0:5673").await;
}));
for thread in threads {
let _ = thread.await;
}
Ok(())
}
|