Skip to content

Contributing

Michael Wiltfong edited this page Dec 21, 2023 · 1 revision

Adding Environment Variables

If you are adding additional environment variables, then you will need to update a couple files in this project. Here is a list to help out:

  1. You will have to update .env.example that way it's clear to future contributors how to configure the app.
  2. To create a better experience with debugging environment variables, this repo sanitizes the provided .env file. It does this through ./server/utils/Config. Once you add your environment variable, you will have to add it to two places in Config.ts. You will have to add it to the ENV type, and then as a key-value pair in the getConfig() function.
  3. The workflow will also have to be updated. How and where you will update the workflow depends on where your environment variable is being used in the code. A good example is the server-tests job, which you can see here. The environment variable may be private. As a result you will have to work with the maintainer (Michael), to add the new environment variable value to the repos secrets. Otherwise, you can hardcode the variable in the workflow.
Clone this wiki locally