Spark web server
github.com
github.com
Oh. It's written in Go. Got it.
I just don't get it.
It seems delusional to think that this sort of comment is somehow a good learning experience for a library author. Everyone knows that you shouldn't reinvent the wheel, but there are reasonable disagreements on what exactly that means.
You're right that I don't think it's useful to have a proliferation of tools that do one thing worse than a general-purpose tool.
I don't want an avocado peeler - I'll use a knife and I'll recommend using a knife to others.
Unfortunately, even with the tone removed, the comment hits that "top-voted middlebrow" button for many of the other people on the site. I would however say that for TFA itself as well.
[1] the opinion of some random interdweeb carries a lot of weight, I know. :)
Your initial comment, however, is filled with a denigrating tone. It is that tone your parent is addressing. Not so much the content. The tone. It is unkind.
<h1>Maintenance</h1><p>will be back soon!</p>
Oh. It's written in C. Got it.
Also, it's not hard to keep a maintenance conf file around, pointing to a different directory. At least, it's certainly no harder than downloading a second web server. Then it's just "sudo ln /etc/sites-available/maintenance /etc/sites-enabled/conf"
return 503 "<h1>Maintenance</h1><p>will be back soon!</p>"; # pgrep nginx
#> Emergency web server
> For those occasions when your webserver is down and you want to display a quick maintainance note. Or just want to quickly demo a static site. Or whatever :)
How is that not an apt comparison?
[0] http://www.fefe.de/gatling/ [1] http://www.fefe.de/fnord/
Deleted comment
Above will serve whatever files you have in $PWD
func (h bytesHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type bytesHandler []byte
The code func (h bytesHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
w.Write(h)
}
is a method declaration for the type bytesHandler. The (h bytesHandler) specifies id and type of the method receiver.This is from the http.Handler interface, so defining this method causes byteHandler to conform to the http.Handler interface.
There is no struct involved here and there doesn't need to be which is nice.