From 321f131e70e2f340d39529bb2cc7bc6a4ba27217 Mon Sep 17 00:00:00 2001 From: JungHyun Kim Date: Tue, 11 Jul 2023 02:23:29 +0900 Subject: [PATCH] Print logo --- server/Cargo.toml | 6 ++++-- server/src/main.rs | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/server/Cargo.toml b/server/Cargo.toml index fb50d62..f8cf732 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,7 +1,9 @@ [package] -name = "server" -version = "0.0.1" +name = "RustyDO" +version = "0.1.0" authors = ["JungHyun Kim "] +readme = "README.md" +repository = "https://github.com/jidoc01/RustyDO" edition = "2021" [dependencies] diff --git a/server/src/main.rs b/server/src/main.rs index eebe354..0fafe7b 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -23,16 +23,32 @@ extern crate anyhow; use crate::prelude::*; +const VERSION: &str = env!("CARGO_PKG_VERSION"); +const AUTHORS: &str = env!("CARGO_PKG_AUTHORS"); +const REPOSITORY: &str = env!("CARGO_PKG_REPOSITORY"); +const LOGO: &str = r" + _____ _ _____ ____ + | __ \ | | | __ \ / __ \ + | |__) | _ ___| |_ _ _| | | | | | | + | _ / | | / __| __| | | | | | | | | | + | | \ \ |_| \__ \ |_| |_| | |__| | |__| | + |_| \_\__,_|___/\__|\__, |_____/ \____/ + __/ | + |___/ "; + #[tokio::main] async fn main() -> Result<()> { + println!("{LOGO}"); + println!("RustyDO v{VERSION}"); + println!("Repository: {REPOSITORY}"); + println!("Contact: {AUTHORS}"); let config = Config::open(CONFIG_PATH)?; let db = Connection::open(DB_PATH)?; db.table(USER_TBL)?; db.table(POST_TBL)?; let mut login = login::Server::new(config.clone(), db); let login_tx = login.get_server_tx(); - status::run(config, login_tx).await; login.run().await; // Note that it will block the thread. Ok(()) -} \ No newline at end of file +}