kevmoo / dhttpd

A simple HTTP server that can serve up any directory, built with Dart.
https://pub.dev/packages/dhttpd
BSD 3-Clause "New" or "Revised" License
107 stars 30 forks source link

feat: add version display supports. #38

Open alextekartik opened 2 years ago

alextekartik commented 2 years ago

Thanks for this little neat tool. I know there are tons of http server in other language but it is always convenient to have something we can install/upgrade using pub.

Sometimes the fastest way to check if a global pub executable is available is to run something like

dart pub global run dhttpd --version

and have an exit code of 0. I added support for the version flag. I copied what was done in webdev (using build_version) and fixed the unit tests.