thegazelle-ad / gazelle-server

Server for front-end and editor tools of The Gazelle
MIT License
19 stars 8 forks source link

Improve config.ts validation #432

Open emilgoldsmith opened 6 years ago

emilgoldsmith commented 6 years ago

Expected Behavior

It should validate everything strictly and correctly

Current Behavior

I for example had not provided a ROOT_DIRECTORY variable in CI environment and that should've errored, but it didn't because it just checks for undefined and not for empty string right now

Possible Solution

I would change the validateString function to also somehow take environment into account and enforce that nothing is empty string except for in development where some things like AWS credentials can be an empty string (but things like DB password and ROOT_DIRECTORY still shouldn't)