Added function to get root_directory
This commit is contained in:
@@ -3,3 +3,8 @@ pub async fn get_db_url() -> String {
|
|||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
std::env::var(crate::keys::DBURL).expect(crate::keys::error::ERROR)
|
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)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user