Skip to content

How to deal with configuration files? #257

Answered by DavidVujic
Laurent-Zerah asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Laurent-Zerah, I'm happy to hear that you like Polylith! About resources, yes, maybe I should add suggestions about that in the docs. Good idea!

One option that I think of is to create one "config" component, and put the constants, paths and settings in there. They can be grouped by context, domain or someting that makes sense. If it's not a problem to share the component between the projects I would go for this approach. You could write the component with sub-namespaces, to make the separation clearer or just organize a data structure with keys and values.

Maybe some of the config values are loaded from the environment variables too? Then I think it would make a lot of sense to put i…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Laurent-Zerah
Comment options

@DavidVujic
Comment options

Answer selected by Laurent-Zerah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants