HomeDisk/core/src/main.rs

22 lines
414 B
Rust
Raw Normal View History

mod init;
use homedisk_utils::{
config::Config,
database::{Database, User},
};
2022-04-16 18:19:38 +00:00
#[tokio::main]
async fn main() {
init::init();
2022-04-16 18:19:38 +00:00
2022-04-16 19:22:01 +00:00
let _config = Config::parse().expect("parse configuration file");
let _db = Database::open("homedisk.db").expect("open SQLite database");
let user = User::new("medzik", "password").unwrap();
println!("{:?}", user);
_db.create_user(user).unwrap();
2022-04-16 18:19:38 +00:00
}