diff --git a/Cargo.toml b/Cargo.toml index e10a3ac..03eb2af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,8 +6,8 @@ edition = "2024" [dependencies] actix-web = "4.10" serde = { version = "1.0.219", features = ["derive"] } -sqlx = "0.8" -toml = "0.8.21" +sqlx = { version = "0.8", features = ["runtime-tokio", "tls-native-tls", "postgres"] } +toml = "0.8" url = { version = "2.5.4", features = ["serde"] } [dependencies.tokio] diff --git a/src/config.rs b/src/config.rs index a58718e..a9f720d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,6 @@ use serde::Deserialize; use tokio::fs::read_to_string; use crate::Error; -use url::Url; - #[derive(Debug, Deserialize)] pub struct ConfigBuilder { @@ -15,6 +13,7 @@ pub struct Database { username: String, password: String, hostname: String, + database: String, port: u16 }