Add initial database schema and references
Some checks are pending
Build Crate / build (push) Waiting to run
Some checks are pending
Build Crate / build (push) Waiting to run
Also look into users a bit
This commit is contained in:
@@ -18,6 +18,8 @@ cfg_if::cfg_if! {
|
||||
stores::MutableStore,
|
||||
turbine::Turbine,
|
||||
};
|
||||
use futures::executor::block_on;
|
||||
use sea_orm::{Database};
|
||||
use crate::server::routes::register_routes;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +37,13 @@ pub async fn dflt_server<M: MutableStore + 'static, T: TranslationsManager + 'st
|
||||
|
||||
app = register_routes(app);
|
||||
|
||||
// TODO -> Update to use environment variable
|
||||
if let Err(err) = block_on(Database::connect(
|
||||
"postgres://elo:elo@localhost:5432/elo_app",
|
||||
)) {
|
||||
panic!("{}", err);
|
||||
}
|
||||
|
||||
axum::Server::bind(&addr)
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user