From 31cd542929f595d476fe3702cdf3888f70680d48 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Mon, 9 Feb 2015 22:33:17 -0800 Subject: [PATCH] with SM_STATIC ENV variable --- cmd/smweb/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/smweb/main.go b/cmd/smweb/main.go index 7b87fbf..946ab14 100644 --- a/cmd/smweb/main.go +++ b/cmd/smweb/main.go @@ -1,12 +1,15 @@ package main -import "net/http" +import ( + "net/http" + "os" +) func main() { http.Handle( "/", http.FileServer( - http.Dir("."), + http.Dir(os.Getenv("SM_STATIC")), ), ) if err := http.ListenAndServe(":8000", nil); err != nil {