Skip to content

Conversation

@NightTrek
Copy link

  • Add python-dotenv dependency for loading environment variables from .env files
  • Create comprehensive .env.example template with all supported configuration options
  • Implement .env file loading in server.py with proper precedence handling:
    • Command-line arguments (highest priority)
    • Environment variables
    • Values from .env file
    • Default values (lowest priority)
  • Support both DATABASE_URI and individual connection parameters (DB_HOST, DB_PORT, etc.)
  • Add environment configuration documentation to README.md
  • Maintain backward compatibility with existing configuration methods

This enhancement improves security by keeping sensitive credentials out of command-line arguments and version control, while providing a more convenient configuration workflow for development and deployment scenarios.

- Add python-dotenv dependency for loading environment variables from .env files
- Create comprehensive .env.example template with all supported configuration options
- Implement .env file loading in server.py with proper precedence handling:
  * Command-line arguments (highest priority)
  * Environment variables
  * Values from .env file
  * Default values (lowest priority)
- Support both DATABASE_URI and individual connection parameters (DB_HOST, DB_PORT, etc.)
- Add environment configuration documentation to README.md
- Maintain backward compatibility with existing configuration methods

This enhancement improves security by keeping sensitive credentials out of command-line arguments and version control, while providing a more convenient configuration workflow for development and deployment scenarios.
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

Successfully merging this pull request may close these issues.

1 participant