Removing environment and keys modules
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
pub async fn get_db_url() -> String {
|
||||
dotenvy::dotenv().ok();
|
||||
std::env::var(crate::keys::DBURL).expect(crate::keys::error::ERROR)
|
||||
}
|
||||
|
||||
pub async fn get_root_directory() -> Result<String, std::env::VarError> {
|
||||
dotenvy::dotenv().ok();
|
||||
std::env::var(crate::keys::ROOT_DIRECTORY)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
pub const DBURL: &str = "DATABASE_URL";
|
||||
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
|
||||
|
||||
pub mod error {
|
||||
pub const ERROR: &str = "DATABASE_URL must be set in .env";
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
pub mod callers;
|
||||
pub mod environment;
|
||||
pub mod keys;
|
||||
|
||||
pub mod db {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user