divhide/node-grunt-http-server

Silent option for http-server

Closed this issue · 4 comments

Hi Oscar!

http-server has --silent CLI option to prevent printing requested files to console, while it's not yet available in the grunt task.

Could you please advise if it's possible to add this option to the task? I would like to submit a PR for it. Or do I need to go to http-server github?

Best,
Oleksandr.

Their silent option is done by adding the logFn: requestLogger during the initialisation.
If you pass the logFn: null as an option you should get the silent behaviour.

But maybe its a good idea to add that option to this grunt plugin.

Let me know what you think and if that worked.

This have worked perfectly, many thanks! I would never guess this trick, so I believe the mirrored option from http-server readme will be more convenient.

Gonna leave this opened to document that functionality.

Documentation published with v1.4.