Centralize configuration and add some new config (#494)
Ideally, if someone could review the idea in [this comment](https://github.com/Plume-org/Plume/issues/273#issuecomment-474982184), I'd like to add the implementation to this pr too
This commit is contained in:
committed by
Baptiste Gelez
parent
b945d1f602
commit
65bb50e88f
@@ -6,7 +6,7 @@ extern crate rpassword;
|
||||
|
||||
use clap::App;
|
||||
use diesel::Connection;
|
||||
use plume_models::{Connection as Conn, DATABASE_URL};
|
||||
use plume_models::{Connection as Conn, CONFIG};
|
||||
use std::io::{self, prelude::*};
|
||||
|
||||
mod instance;
|
||||
@@ -24,7 +24,7 @@ fn main() {
|
||||
let matches = app.clone().get_matches();
|
||||
|
||||
dotenv::dotenv().ok();
|
||||
let conn = Conn::establish(DATABASE_URL.as_str());
|
||||
let conn = Conn::establish(CONFIG.database_url.as_str());
|
||||
|
||||
match matches.subcommand() {
|
||||
("instance", Some(args)) => {
|
||||
|
||||
Reference in New Issue
Block a user