with SM_STATIC ENV variable

This commit is contained in:
Stephen McQuay 2015-02-09 22:33:17 -08:00
parent dd1e615d14
commit 31cd542929
1 changed files with 5 additions and 2 deletions

View File

@ -1,12 +1,15 @@
package main package main
import "net/http" import (
"net/http"
"os"
)
func main() { func main() {
http.Handle( http.Handle(
"/", "/",
http.FileServer( http.FileServer(
http.Dir("."), http.Dir(os.Getenv("SM_STATIC")),
), ),
) )
if err := http.ListenAndServe(":8000", nil); err != nil { if err := http.ListenAndServe(":8000", nil); err != nil {