diff --git a/documentation/images/cli.png b/documentation/images/cli.png new file mode 100644 index 0000000..dff81db Binary files /dev/null and b/documentation/images/cli.png differ diff --git a/src/core/README.md b/src/core/README.md index 878ef43..f404aab 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -1,6 +1,5 @@ # Core - -The `core` module contains the fundamental components for setting up and configuring the API backend. It includes server creation, environment configuration management, and middleware layers that enhance the overall performance and observability of the API. +The `core` module contains the fundamental components for setting up and configuring Axium. It includes server creation, environment configuration management, and middleware layers that enhance the overall performance and observability of the API. ## Contributing Ensure new middleware is well-documented, includes error handling, and integrates with the existing architecture. diff --git a/src/database/connect.rs b/src/database/connect.rs index 3bb9f74..2025bf5 100644 --- a/src/database/connect.rs +++ b/src/database/connect.rs @@ -121,20 +121,19 @@ pub async fn run_database_migrations(pool: &PgPool) -> Result<(), DatabaseError> // Initialize migrator with production safety checks let migrator = Migrator::new(migrations_path) - .await - .map_err(|e| DatabaseError::MigrationError(e))?; + .await + .map_err(|e| DatabaseError::MigrationError(e))?; - // Execute migrations in transaction if supported + // Skip migrations execution in production, just print a message if env::var("ENVIRONMENT").unwrap_or_else(|_| "development".into()) == "production" { - println!("🛑 Migration execution blocked in production."); - return Err(DatabaseError::ConfigError( - "🛑 Direct migrations disabled in production.".to_string() - )); + println!("🛑 Migration execution skipped in production."); + return Ok(()); // Return early without error } + // Execute migrations in transaction if supported migrator.run(pool) .await .map_err(DatabaseError::MigrationError)?; Ok(()) -} \ No newline at end of file +} diff --git a/src/handlers/README.md b/src/handlers/README.md index 79b8b5b..0e704e8 100644 --- a/src/handlers/README.md +++ b/src/handlers/README.md @@ -1,6 +1,5 @@ -# Handlers Module for Rust API - -This folder contains the route handlers used in the Rust API, responsible for processing incoming HTTP requests and generating responses. +# Handlers +This folder contains the route handlers used in Axium, responsible for processing incoming HTTP requests and generating responses. ## Overview The `/src/handlers` folder includes implementations of route handlers for API keys, usage metrics, and the homepage.