feat: update
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-04-10 20:50:48 +02:00
parent ec8d0b5ebc
commit 74ea9ddf79
35 changed files with 5 additions and 11 deletions

1
crates/scel/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/target

16
crates/scel/Cargo.toml Normal file
View File

@@ -0,0 +1,16 @@
[package]
name = "scel"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.22", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = { version = "1.0.66" }
dotenv = { version = "*" }
scel_api = { path = "../scel_api" }
scel_core = { path = "../scel_core" }

28
crates/scel/src/main.rs Normal file
View File

@@ -0,0 +1,28 @@
use std::sync::Arc;
use dotenv::dotenv;
use scel_core::App;
use tracing::info;
use tracing_subscriber::{EnvFilter, FmtSubscriber};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
dotenv().ok();
let subscriber = FmtSubscriber::builder()
.with_env_filter(
EnvFilter::default()
.add_directive("tower_http=debug".parse().unwrap())
.add_directive("scel_api=info".parse().unwrap())
.add_directive("scel=info".parse().unwrap()),
)
.finish();
tracing::subscriber::set_global_default(subscriber)?;
info!("Starting scel");
let app = Arc::new(App::new());
scel_api::Server::new(app.clone()).start().await
}