chore: update examples
This commit is contained in:
parent
a9df98ae61
commit
b7adb8afaf
5 changed files with 6 additions and 6 deletions
|
@ -1 +1 @@
|
|||
DATABASE_URL=postgres://user:test@localhost:5534:5432/db
|
||||
DATABASE_URL=postgres://user:test@localhost:5534/db
|
|
@ -4,6 +4,6 @@ use diesel::pg::PgConnection;
|
|||
|
||||
pub fn establish_connection() -> PgConnection {
|
||||
let database_url = cfg::DATABASE_URL();
|
||||
PgConnection::establish(&database_url)
|
||||
PgConnection::establish(database_url)
|
||||
.expect(&format!("Error connecting to {}", database_url))
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::models::*;
|
|||
|
||||
|
||||
config! {
|
||||
DATABASE_URL: String,
|
||||
DATABASE_URL,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ config! {
|
|||
PORT => 8000,
|
||||
),
|
||||
|
||||
JSON_API_URL < (
|
||||
static JSON_API_URL < (
|
||||
HYPER_PREFER_SCHEMA,
|
||||
"://",
|
||||
HYPER_HOST,
|
||||
|
|
|
@ -10,7 +10,7 @@ config! {
|
|||
ROCKET {
|
||||
HOST: String => "localhost",
|
||||
PORT: u16 => 9000,
|
||||
BASE_URL: String => "/",
|
||||
BASE_URL => "/",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,6 @@ fn main() {
|
|||
cfg::init();
|
||||
|
||||
rocket::ignite()
|
||||
.mount(&cfg::ROCKET::BASE_URL(), routes![index])
|
||||
.mount(cfg::ROCKET::BASE_URL(), routes![index])
|
||||
.launch();
|
||||
}
|
Reference in a new issue