DEV Community

Discussion on: What's your favorite way to manage system-wide settings? (except .env)

Collapse
 
avalander profile image
Avalander

If you need to keep an arbitrarily long set of settings that the users can update, I think there aren't many things more convenient than a key-value table in the database.

In past projects, we have used a similar configuration, but we added a type column to the table and then used that to parse and validate the value when reading and writing the configuration to avoid runtime errors due to invalid values.