2024-04-13 02:17:34 +00:00
|
|
|
use config::Config;
|
2024-04-16 00:19:09 +00:00
|
|
|
use tracing::error;
|
2024-04-13 02:17:34 +00:00
|
|
|
|
|
|
|
pub mod config;
|
2023-12-20 06:18:09 +00:00
|
|
|
pub mod engines;
|
|
|
|
pub mod normalize;
|
|
|
|
pub mod parse;
|
|
|
|
pub mod web;
|
|
|
|
|
2023-12-22 00:43:29 +00:00
|
|
|
#[tokio::main(flavor = "current_thread")]
|
2023-12-20 06:18:09 +00:00
|
|
|
async fn main() {
|
2024-04-16 00:19:09 +00:00
|
|
|
tracing_subscriber::fmt::init();
|
|
|
|
|
2024-04-13 02:17:34 +00:00
|
|
|
let config = match Config::read_or_create() {
|
|
|
|
Ok(config) => config,
|
|
|
|
Err(err) => {
|
2024-04-16 00:19:09 +00:00
|
|
|
error!("Couldn't parse config:\n{err}");
|
2024-04-13 02:17:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
web::run(config).await;
|
2023-12-20 06:18:09 +00:00
|
|
|
}
|