Add dotenvy

This commit is contained in:
0xf8 2023-06-21 15:31:31 -04:00
parent fff5e1a1a0
commit 95dc6ebd61
Signed by: 0xf8
GPG Key ID: 446580D758689584
3 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,7 @@ base64 = "0.21.2"
bcrypt = "0.14.0"
colored = "2.0.0"
dialoguer = { version = "0.10.4", default-features = false, features = ["password"] }
dotenvy = "0.15.7"
driftwood = "0.0.7"
femme = "2.2.1"
futures = "0.3.28"

View File

@ -12,6 +12,7 @@
#![feature(fs_try_exists)]
use anyhow::{bail, Result};
use dotenvy::dotenv;
use log::{info, warn};
use log::LevelFilter::Debug;
@ -21,6 +22,8 @@ mod server;
#[async_std::main]
async fn main() -> Result<()> {
let _ = dotenv();
// Early catch
if std::env::var("DATABASE_URL").is_err() {
bail!("DATABASE_URL needs to be set.")

View File

@ -12,7 +12,8 @@
#![feature(fs_try_exists)]
use anyhow::{bail, Result};
use log::{debug, error, info, log, trace, warn};
use dotenvy::dotenv;
use log::error;
use log::LevelFilter::{Debug, Info};
use yggdrasil::*;
@ -22,6 +23,8 @@ mod dbtool;
#[async_std::main]
async fn main() -> Result<()> {
let _ = dotenv();
// Early catch
if std::env::var("DATABASE_URL").is_err() {
bail!("DATABASE_URL needs to be set.")