extracts server in its own module

This commit is contained in:
2019-06-22 15:23:29 +02:00
parent f5e495734f
commit a77fce417c
4 changed files with 43 additions and 40 deletions

View File

@@ -48,7 +48,7 @@ impl Player {
pub fn create_pool() -> Pool {
dotenv::dotenv().ok();
dbg!(dotenv::dotenv().ok());
let connspec = std::env::var("DATABASE_URL").expect("DATABASE_URL");
let manager = ConnectionManager::<DbConnection>::new(connspec);
r2d2::Pool::builder()