rodekruis / helpful-information

A web-app for People Affected to lookup useful organizations and information.
Apache License 2.0
2 stars 2 forks source link

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

Open elwinschmitz opened 1 year ago

elwinschmitz commented 1 year ago

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"

Things to consider:

Examples / Inspiration / Related

To Do

elwinschmitz commented 1 year ago

See: https://codingsans.com/blog/node-config-best-practices

Use https://github.com/mozilla/node-convict ?

Or https://github.com/indexzero/nconf ?