fvsch / servitsy

Small, local HTTP server for static files
MIT License
3 stars 0 forks source link

fix: split arg parsing and option validation #26

Closed fvsch closed 2 weeks ago

fvsch commented 2 weeks ago

Biggish refactor. I rewrote all the options validation code to first parse string CLI arguments, then validate an object of options.

Behavior change: now any issue with arguments or option validation is considered an error, and stops the program. I originally tried to treat some as "warnings" and some as "errors" (critical), but that was very arbitrary and I got some feedback from developers expecting the program to just error out.