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

Environment variable mandatory #21

Closed
lucasgomide opened this issue Oct 2, 2018 · 2 comments · Fixed by #22
Closed

Environment variable mandatory #21

lucasgomide opened this issue Oct 2, 2018 · 2 comments · Fixed by #22

Comments

@lucasgomide
Copy link
Contributor

There are some environment variable mandatory for starting web project. Most of them, shouldn't mandatory tough. I'd like to propose addition a fallback for each one env that is not really mandatory to start the application, such as PUBLIC_HTML=/public, MONGODB_URI=mongodb://127.0.0.1:27017/db and PORT=8080

@danielfireman What do you think ? Is it makes sense ?

@lucasgomide lucasgomide changed the title Environment variable doesn't mandatory Environment variable mandatory Oct 2, 2018
@danielfireman
Copy link
Owner

Sounds great to me. Two small caveats:

  • PUBLIC_HTML should default to public (instead of /public)
  • We sould log the env vars? Maybe it is time to start using kelsey's envconfig awesome lib?

@lucasgomide
Copy link
Contributor Author

Great ideia

lucasgomide added a commit to lucasgomide/temp-to-go that referenced this issue Oct 2, 2018
lucasgomide added a commit to lucasgomide/temp-to-go that referenced this issue Oct 2, 2018
lucasgomide added a commit to lucasgomide/temp-to-go that referenced this issue Oct 2, 2018
lucasgomide added a commit to lucasgomide/temp-to-go that referenced this issue Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants