You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2021. It is now read-only.
In this PR@kwelch commented that he normally uses .env to create enviroment variables. I also read that Heroku good practises suggests to use that approach as well.
The goal of this issue is to research different possible ways to load env variables, and decide which one makes more sense for this project. Either keeping current approach or move to a new one.
Also, let's take advantage of this and use a better way to notify the user when sone of the variables are not found. Current approach is to throw an error (which is fine, because the app shouldnt be working if some env variables are not running) but I'd prefer if we can be more specific on the exception (for example checking all the env variables, and see if we have values for them. Otherwise notify which variables are missing and how to set them)
Example:
MISSING ENV Variables
------------------------
Hey! There are some variables in your project that you haven't set up. Without them, we can't run the server since some of the configurations may not work.
See this doc to know how to set your enviroment variable: <link to this repo README>
==================================================================
| GOOGLE_SECRET -> We use this to be able to access Google accounts. <optionally add a link to get this credentials>
------------------------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
I'm thinking that managing the missing env variables can be a npm package itself! I'm sure more people have problems with this. What do you think @kwelch?
I think using dotenv is a great plan. Some places use a .env.example to show what variables are there and sample versions. Also, we should default any of them if possible. I also think a readme is a great place to expand on it. All good approached.
Are far as notification and requiring them, I think that is interesting idea. Maybe it is something we can contribute back to dotenv as an optional field of what is required and so forth.
I think using dotenv is a great plan. Some places use a .env.example to show what variables are there and sample versions. Also, we should default any of them if possible. I also think a readme is a great place to expand on it. All good approached.
Are far as notification and requiring them, I think that is interesting idea. Maybe it is something we can contribute back to dotenv as an optional field of what is required and so forth.
Yeah! Absolutely agree. Would love to contribute to dotenv for this ^_^
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In this PR @kwelch commented that he normally uses
.env
to create enviroment variables. I also read that Heroku good practises suggests to use that approach as well.The goal of this issue is to research different possible ways to load env variables, and decide which one makes more sense for this project. Either keeping current approach or move to a new one.
Also, let's take advantage of this and use a better way to notify the user when sone of the variables are not found. Current approach is to throw an error (which is fine, because the app shouldnt be working if some env variables are not running) but I'd prefer if we can be more specific on the exception (for example checking all the env variables, and see if we have values for them. Otherwise notify which variables are missing and how to set them)
Example:
The text was updated successfully, but these errors were encountered: