Replace DB_URL with DATABASE_URL

This way it is shared with diesel, which simplifies a lot the setup

Also fixes a few issues in the documentation, that are not directly related
This commit is contained in:
Bat
2018-10-06 19:17:36 +01:00
parent 7a64005ca9
commit 9cc795d8be
8 changed files with 47 additions and 43 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ extern crate rpassword;
use clap::App;
use diesel::Connection;
use std::io::{self, prelude::*};
use plume_models::{DB_URL, Connection as Conn};
use plume_models::{DATABASE_URL, Connection as Conn};
mod instance;
mod users;
@@ -22,7 +22,7 @@ fn main() {
let matches = app.clone().get_matches();
dotenv::dotenv().ok();
let conn = Conn::establish(DB_URL.as_str());
let conn = Conn::establish(DATABASE_URL.as_str());
match matches.subcommand() {
("instance", Some(args)) => instance::run(args, &conn.expect("Couldn't connect to the database.")),