-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove opionated middleware and tracing, cleanup unused imp…
…orts, add proper creation of tests db
- Loading branch information
Showing
9 changed files
with
24 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ PORT=8080 | |
|
||
DATABASE_URL="postgres://postgres:[email protected]:5432/example" | ||
DATABASE_POOL_MAX_SIZE=50 | ||
# Used in tests to remove the database prefix from DATABASE_URL and replace it with a random database name. | ||
DATABASE_NAME="example" | ||
|
||
# Configures which modules `tracing_subscriber` should emit logs for. | ||
# | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use axum::Json; | ||
use serde_json::{json, Value}; | ||
|
||
pub async fn health_check_handler() -> Json<Value> { | ||
pub async fn health_check() -> Json<Value> { | ||
Json(json!({ "status": "ok" })) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
use axum::{routing::get, Router}; | ||
|
||
mod health_check; | ||
pub(crate) use health_check::health_check_handler; | ||
pub mod health_check; | ||
|
||
use crate::AppState; | ||
|
||
pub fn router() -> Router<AppState> { | ||
Router::new().route("/health_check", get(health_check_handler)) | ||
Router::new().route("/health_check", get(health_check::health_check)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters