http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Add --no-verbose CLI option

Open Xmader opened this issue 6 years ago • 5 comments

Please ensure that your pull request fulfills these requirements:

  • [x] The pull request is being made against the master branch
  • [x] Tests for the changes have been added (for bug fixes / features)

What is the purpose of this pull request? (bug fix, enhancement, new feature,...)

Add a option to prevent showing all the request info, but show the basic info.

fixes #532

fixes #381

What changes did you make?

Add --no-verbose option

Provide some example code that this change will affect, if applicable:

N/A

Xmader avatar Jun 05 '19 03:06 Xmader

I'm not sure of the usefulness of this option. The info is already shown by default, and will be the only output before any requests are made (providing the clickable link in some terminal emulators, as mentioned in the linked issues). And then there is already --silent to suppress all logging. What is the additional benefit of this "sort-of-silent" option?

thornjad avatar Dec 11 '19 17:12 thornjad

The use-case is this: spawning a dev server for folks in scaffolded projects, many developers don't know what port http-server was spawned on (especially if it auto-selected a free port). That makes the URL output immensely valuable, since otherwise you have to know that the default is 8080 and it uses an incrementing search to find free ports.

However, verbose request logging for a development server is not workable: it interlaces request logs with far more important information, like build information and errors. There are many cases where request logging is unnecessary, yet where the display of a server's listen() address is still important.

developit avatar Mar 26 '20 16:03 developit

For use in scaffolding, would it be sufficient to have the scaffold pass a predetermined port into http-server and tell the user that port?

thornjad avatar Apr 06 '20 15:04 thornjad

This pull request has been inactive for 360 days

github-actions[bot] avatar Aug 21 '21 12:08 github-actions[bot]

I think I've come round on this change, and I'm down to review it, but a few things first:

  • [ ] fix merge conflicts and merge master
  • [ ] add documentation:
    • [x] --help output
    • [x] README.md
    • [ ] doc/http-server.1

thornjad avatar Oct 12 '21 03:10 thornjad