Add travis deployment and increase version to 0.1.0

This commit is contained in:
Amrit Panesar committed 2017-12-31 10:03:49 -08:00
1 parent e449aa01a9
commit 43518a836d
4 files changed
+23 -9

No files matched your search

+5 -2
View File
@@ -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 {