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

Backend - Env Scattering Issue and Create a Setting File #152

Open
minhngo3818 opened this issue May 11, 2023 · 0 comments
Open

Backend - Env Scattering Issue and Create a Setting File #152

minhngo3818 opened this issue May 11, 2023 · 0 comments
Labels
Backend task relates to backend enhancement improve a feature for better usage

Comments

@minhngo3818
Copy link
Collaborator

The environment variables should be placed in one place and then export to other files. However, some env variables like "host", and "port", database URL, and so on are hard-coded or imported directly from .env file. Some framework like .Net or Django has a setting file to assign all env variable and then abstractly use it in other files. This way will help our code base more maintainable.

Issues:

  • May use index js to add all setting variables, or create a setting file
  • Collect all environment variables scattered over the codebase, and place them in that file (mostly env)
  • Replace env variables in the code base with the exported values from the setting file.
@minhngo3818 minhngo3818 added enhancement improve a feature for better usage Backend task relates to backend labels May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend task relates to backend enhancement improve a feature for better usage
Projects
None yet
Development

No branches or pull requests

1 participant