Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement environment variable configuration #49

Closed
coderabbitai bot opened this issue Feb 8, 2025 · 1 comment
Closed

Implement environment variable configuration #49

coderabbitai bot opened this issue Feb 8, 2025 · 1 comment

Comments

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2025

Overview

Currently, some configuration values like debug mode are hardcoded. This issue proposes implementing environment variable configuration to make the application more configurable.

Proposed Changes

  • Create AppConfiguration struct to manage application-wide configuration
  • Read configuration from environment variables with sensible defaults
  • Make configuration available throughout the application via Vapor's storage
  • Add logging of configuration on startup

Environment Variables

  • APP_DEBUG: Enable debug mode (true/false)
  • APP_ENV: Application environment (development/staging/production)
  • STATIC_PATH: Path for static assets
  • DECIMAL_COUNT: Number of decimal places for numerical values

Related Discussion

This implementation was discussed in PR #48 (//pull/48)

Implementation Details

The implementation will follow the structure outlined in the PR discussion, focusing on type-safety and proper error handling.

/cc @Dracks

@Dracks
Copy link
Owner

Dracks commented Feb 9, 2025

Use some package to load the BuildingInfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant