Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a configuration file (beyond ENV-variables) #595

Open
elwinschmitz opened this issue Jan 30, 2023 · 1 comment
Open

Use a configuration file (beyond ENV-variables) #595

elwinschmitz opened this issue Jan 30, 2023 · 1 comment
Labels
Change: Code Changes to logic/templates required Client: Demo Specifically for Demo-purposes documentation Improvements or additions to documentation enhancement New feature or request Size: S Small, 1 day for 1 developer
Milestone

Comments

@elwinschmitz
Copy link
Member

elwinschmitz commented Jan 30, 2023

To simplify the configuration of multiple regions (and multiple properties per Region), it would be nice to be able to use something more convenient then ENV-variables.

For example:

regions: [
  {
    slug: "test",
    label: "Testing",
    sheetID: "abc...xyz",
    propertyX: ""
  },
  {
    slug: "example",
    label: "For Example",
    sheetID: "zyx...cba",
    propertyY: ""
  }
]

Preferably using a commonly used 'default'. (Like dotenv)

Option: "as JS"

  • Using .config.js or [.?]helpful-information.config.js
  • with module.exports = ...
  • Would allow for comments, extra formatting, etc
  • Choose between CJS or ESM format?

Things to consider:

  • How to easily override per environment? (Or at least in local development?)
    • Maybe with:

      • .defaults.config.js (always present, with comments)
      • .env.config.js (optional, ignored by git)
      • .local.config.js (optional, only for local development, ignored by git)
        All 3 files could be checked for, and then 'merged on top of' the defaults during a build/run.
    • Or there might be an existing practice/package for this?

  • How to define (safe) defaults? (And then override only when needed)
  • How to ignore in git (and keep override/defaults features)?

Examples / Inspiration / Related

To Do

@elwinschmitz elwinschmitz added documentation Improvements or additions to documentation enhancement New feature or request Change: Code Changes to logic/templates required Size: S Small, 1 day for 1 developer Client: Demo Specifically for Demo-purposes labels Jan 30, 2023
@elwinschmitz elwinschmitz added this to the Research milestone Feb 28, 2023
@elwinschmitz
Copy link
Member Author

elwinschmitz commented Jun 30, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change: Code Changes to logic/templates required Client: Demo Specifically for Demo-purposes documentation Improvements or additions to documentation enhancement New feature or request Size: S Small, 1 day for 1 developer
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant