You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
848 B
32 lines
848 B
mod grpc;
|
|
mod db;
|
|
mod games;
|
|
mod logger;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let (close, _stdin) = logger::setup().unwrap();
|
|
// protobuf::route_guide_grpc::RouteGuid
|
|
for i in 0..100 {
|
|
std::thread::sleep(std::time::Duration::from_secs_f32(0.1));
|
|
|
|
if i == 69 {
|
|
log::info!("69 Nͬ͂ͧi̽̅̽҉̫̕͢ĉ͆̚҉̢͞͏eͫ̑͑");
|
|
std::thread::sleep(std::time::Duration::from_secs_f32(0.2));
|
|
}else{
|
|
log::info!("{}", i);
|
|
}
|
|
}
|
|
|
|
let games = games::load_games();
|
|
log::info!("{:?}", games);
|
|
games[0].run(4);
|
|
let pool = db::DbPool::new().await;
|
|
let mut conn = pool.acquire().await;
|
|
println!("{}", conn.add_user("Hi").await);
|
|
println!("{:?}", conn.users().await);
|
|
conn.close().await;
|
|
grpc::start(pool).await;
|
|
|
|
close.close();
|
|
}
|
|
|