Configuration is a place for things that are configurable. Constants may belong inside of configuration but often times they do not. Configuration files often get flooded with tons of constants which can make it difficult to read code when abused.
Simple Rules of Thumb
Belongs in configuration
- The value is different across environments (database config, API keys, secrets / tokens)
- Live reloading is required
- Passwords / secrets that don't belong in source control
Doesn't belong in configuration
- String constants (Email subject lines, Error Messages, ...)
- Attribute lists or sets of constants