Consistent error message casing.
This commit is contained in:
+5
-5
@@ -24,24 +24,24 @@ async fn main() -> anyhow::Result<()> {
|
||||
.max_connections(5)
|
||||
.connect(&database_url)
|
||||
.await
|
||||
.context("Failed to connect to database")?;
|
||||
.context("failed to connect to database")?;
|
||||
|
||||
sqlx::migrate!()
|
||||
.run(&pool)
|
||||
.await
|
||||
.context("Failed to run database migrations")?;
|
||||
.context("failed to run database migrations")?;
|
||||
|
||||
let host = env::var("HOST").context("HOST must be set")?;
|
||||
let port = env::var("PORT").context("PORT must be set")?;
|
||||
let addr = format!("{}:{}", host, port);
|
||||
let listener = TcpListener::bind(&addr)
|
||||
.await
|
||||
.context(format!("Failed to bind to address: {}", addr))?;
|
||||
.context(format!("failed to bind to address: {}", addr))?;
|
||||
|
||||
tracing::info!(%addr, "Starting server");
|
||||
tracing::info!(%addr, "starting server");
|
||||
axum::serve(listener, routes::create_router(pool).into_make_service())
|
||||
.await
|
||||
.context("Server stopped unexpectedly")?;
|
||||
.context("server stopped unexpectedly")?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user