Added gitignore
This commit is contained in:
1
vidow-backend/crates/vidow_bin/.gitignore
vendored
Normal file
1
vidow-backend/crates/vidow_bin/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target
|
14
vidow-backend/crates/vidow_bin/Cargo.toml
Normal file
14
vidow-backend/crates/vidow_bin/Cargo.toml
Normal file
@@ -0,0 +1,14 @@
|
||||
[package]
|
||||
name = "vidow_bin"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
vidow_core = { path = "../vidow_core" }
|
||||
|
||||
dotenv = { version = "0.15.0", features = ["clap"] }
|
||||
tracing = { version = "0.1.37", features = ["log"] }
|
||||
tracing-subscriber = { version = "0.3.16", features = ["parking_lot", "serde", "serde_json", "tracing", "tracing-serde", "json", "env-filter"] }
|
||||
eyre = "0.6.8"
|
23
vidow-backend/crates/vidow_bin/src/main.rs
Normal file
23
vidow-backend/crates/vidow_bin/src/main.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use eyre::Context;
|
||||
use tracing::info;
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||
use vidow_core::config::AppConfig;
|
||||
|
||||
#[tokio::main]
|
||||
fn main() -> eyre::Result<()> {
|
||||
dotenv::dotenv().context("could not load .env file")?;
|
||||
let config = AppConfig::new();
|
||||
|
||||
tracing_subscriber::registry()
|
||||
.with(tracing_subscriber::EnvFilter::new(config.rust_log()))
|
||||
.with(tracing_subscriber::fmt::layer())
|
||||
.init();
|
||||
|
||||
info!("environment loaded and configuration parsed");
|
||||
|
||||
Api::serve(config)
|
||||
.await
|
||||
.context("could not initialize api")?;
|
||||
|
||||
Ok(())
|
||||
}
|
Reference in New Issue
Block a user