Add dotenvy
This commit is contained in:
parent
fff5e1a1a0
commit
95dc6ebd61
@ -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"
|
||||
|
@ -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.")
|
||||
|
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user