vvanouytsel / jetspotter

MIT License
22 stars 2 forks source link

Swap config to use Viper #30

Closed rorpage closed 3 months ago

rorpage commented 4 months ago

I have some ideas I was going to run by you about how to use a config file to specify arrays of locations and/or arrays of tail numbers to watch for specific planes.

This PR implements Viper to pull environment variables. It might seem like a large PR, but everything I tested works the same as before. Viper gives you strong typing for envvars and allows for config files.

I also added a new envvar (LOG_NEW_PLANES_TO_CONSOLE) to toggle the console logging of new plane info. It still notifies you that a plane or planes were found, but it suppresses the info about it/them.

Please let me know what you think!

rorpage commented 4 months ago

Closes #31