3 ms·
Any obvious reason why this is significantly different than the built-in http.FileServer? https://golang.org/pkg/net/http/#FileServer https://golang.org/pkg/ne
by kevrone 9y ago
Any obvious reason why this is significantly different than the built-in http.FileServer?
https://golang.org/pkg/net/http/#FileServer https://golang.org/pkg/net/http/#FileServer
- phrasz 9y agoIt's not. It's extended from that. However, that code won't deal with other things like changing the port, having a built-in index, or having the server run for a discrete amount of files to serve. Also, go is no different than Java: https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver.... The server just allows it to be stand alone as an application.