Add travis deployment and increase version to 0.1.0
This commit is contained in:
1 parent
e449aa01a9
commit
43518a836d
4 files changed
+23
-9
No files matched your search
@@ -11,12 +11,15 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func serveHttp() {
|
||||
func serveHTTP() {
|
||||
files := http.FileServer(http.Dir(viper.GetString("output")))
|
||||
http.Handle("/", disableDirectoryListing(files))
|
||||
|
||||
log.Printf("Starting embedded http server on port %d\n", viper.GetInt("httpport"))
|
||||
http.ListenAndServe(fmt.Sprintf(":%d", viper.GetInt("httpport")), handlers.LoggingHandler(os.Stdout, http.DefaultServeMux))
|
||||
err := http.ListenAndServe(fmt.Sprintf(":%d", viper.GetInt("httpport")), handlers.LoggingHandler(os.Stdout, http.DefaultServeMux))
|
||||
if err != nil {
|
||||
log.Fatalf("HTTP Server error: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func disableDirectoryListing(h http.Handler) http.HandlerFunc {
|
||||
|
||||
Reference in new issue
Block a user