fix: 🥅 Catch migration error

This commit is contained in:
ThatOneCalculator 2022-04-03 22:11:56 -07:00
parent 35004d8f0f
commit 5fe090c302
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ async fn main() -> io::Result<()> {
.finish()
.unwrap();
let state = AppState { config, pool };
migrate(db_uri, &include_dir!("migrations")).await;
migrate(db_uri, &include_dir!("migrations"))
.await
.expect("Error in migrations!");
println!("🚀 zer0bin is running on {address}");
HttpServer::new(move || {