From 97854359bf3a9604e1a3accead8d89e37be51cc0 Mon Sep 17 00:00:00 2001 From: fa-sharp Date: Fri, 20 Feb 2026 05:42:51 -0500 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 672d9f9..6366ba5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ cargo install cargo-generate Generate a new project from this template: ```bash -cargo generate --git +cargo generate --git https://gitea.fasharp.io/fa-sharp/axum-template ``` You'll be prompted for: @@ -35,16 +35,9 @@ You'll be prompted for: - **Default log level**: trace, debug, info, warn, or error - **Include aide**: Whether to include OpenAPI documentation support -### Manual Setup - -1. Clone or download this repository -2. Update `Cargo.toml` with your project name and details -3. Copy `.env.example` to `.env` and configure your environment variables -4. Run `cargo build` - ## Configuration -Configuration is loaded from environment variables. The prefix is configurable during template generation. +Configuration is loaded from environment variables and validated in the `config.rs` file. The variable prefix is configurable during template generation. Example with `APP` prefix: @@ -58,18 +51,20 @@ APP_PORT=8080 APP_LOG_LEVEL=info ``` -In development, you can use the `.env` file. +In development, you can use the `.env` file to set environment variables. ## Project Structure ``` . ├── src/ -│ ├── main.rs # Entry point, server setup -│ ├── lib.rs # App initialization +│ ├── routes/ # API routes │ ├── config.rs # Configuration management -│ └── state.rs # Application state +│ ├── lib.rs # Axum server setup +│ ├── main.rs # Entry point +│ └── state.rs # Axum server state ├── Cargo.toml # Dependencies +├── .env # Local environment variables └── .env.example # Example environment variables ```