28 lines
765 B
Plaintext
28 lines
765 B
Plaintext
---
|
|
description:
|
|
globs:
|
|
alwaysApply: false
|
|
---
|
|
# Configuration System
|
|
|
|
The application uses a YAML-based configuration system:
|
|
|
|
- [config/](mdc:config): Configuration directory
|
|
- Environment-specific configuration files:
|
|
- `config_dev.yaml`: Development environment configuration
|
|
- `config_prod.yaml`: Production environment configuration
|
|
|
|
The configuration is loaded at startup in [main.go](mdc:main.go) using the `config.Init()` function, with the environment specified via command-line flags:
|
|
|
|
```
|
|
go run main.go -env dev # Run with dev configuration
|
|
go run main.go -env prod # Run with production configuration
|
|
```
|
|
|
|
Configuration includes settings for:
|
|
- Database connection
|
|
- Redis cache
|
|
- Logging
|
|
- Server port and mode
|
|
- External service credentials
|