feat: Configuration checking on backend startup, and via cli. #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
This PR introduces a new feature, to check configuration (provided by the .env file) for values that could cause issues. Some of these issues have been hit in the last few days by looking at Discord support requests, including, but not limited to;
I thought it useful to run this configuration check on startup of the backend service (here shown with the default unchanged env file - hence lots of warnings);
As the log message above says, the check can also be triggered via cli, by doing
npm run command config:check
;Why was this change needed?
My hope is to help smooth the onboarding experience for new users, resulting in less support requests by configuration checking.
Other information;
This is my first Typescript / NextJS / NX and similar PR! I'm not used to this toolchain, so I'm not quite sure what is idiomatic yet. I did run eslint against these changes and didn't see anything reported.
I'm "xconspirisist" on Discord, we discussed this in the #dev-support channel before, so I'm hoping this is well received!