Basic route structure
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
mod config;
|
||||
mod routes;
|
||||
mod tasks;
|
||||
|
||||
use axum::Router;
|
||||
@@ -59,7 +60,11 @@ async fn main() {
|
||||
|
||||
// build the axum app and run the server...
|
||||
info!("Starting application...");
|
||||
let app: Router = Router::new();
|
||||
let app: Router = routes::get_root_router(routes::AppState {
|
||||
database_connection: db_connection,
|
||||
service: std::sync::Arc::new(routes::AppService {}),
|
||||
});
|
||||
|
||||
let address = format!("{}:{}", settings.server.address, settings.server.port);
|
||||
info!("Starting server at http://{}", address);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user