CephalonScientia / wiki-reader

📖 MediaWiki wiki reader
1 stars 0 forks source link

Implement environment variables #10

Open CephalonScientia opened 2 years ago

CephalonScientia commented 2 years ago

Web app should be able to choose which MediaWiki-based wiki to fetch article content from. We do not want to hard-code wiki endpoints within the business logic and views for flexibility. For now, on project build, the wiki chosen will be set in stone. If you want to change the wiki then you have to update the config and rebuild the app.

The following endpoints from the wiki's Special:Version page (e.g. https://en.wikipedia.org/wiki/Special:Version) must be stored as environment variables to enable this functionality:

Environment variables should be stored in a new .env file at the root project directory that should be added to .gitignore.

See the following on implementing environment variables:

CephalonScientia commented 2 years ago

Added in a23d6a2.

CephalonScientia commented 2 years ago

If going with CI/CD, may have to add some additional strings to the appropriate .yml file of the CI/CD tool that contains environment variables (do not store secrets in there).