feature: Add cute banner to backend main

This commit is contained in:
Dominic Harris 2022-04-08 09:08:20 -04:00
parent d5345b3798
commit fe62570ce1
No known key found for this signature in database
GPG Key ID: 93CCF85F3E2A4F65
2 changed files with 7 additions and 1 deletions

View File

@ -43,5 +43,6 @@ pub struct LoggingConfig {
pub fn load(path: PathBuf) -> Config {
let file = File::open(path).expect("Failed to load config");
serde_json::from_reader(file).unwrap()
}

View File

@ -18,6 +18,10 @@ use crate::routes::{
get_paste, get_raw_paste, get_stats, get_total_pastes_badge, get_version_badge, new_paste,
};
const BANNER: &str = "▀▀█ █▀▀ █▀▀█ █▀▀█ █▀▀▄ ▀ █▀▀▄
";
#[derive(Clone)]
pub struct AppState {
pub config: Config,
@ -59,7 +63,8 @@ async fn main() -> io::Result<()> {
let state = AppState { config, pool };
println!("🚀 zer0bin is running on {address}");
println!("{BANNER}");
println!("🚀 Now running on {address}");
HttpServer::new(move || {
let cors = Cors::default()