serve current directory

This commit is contained in:
Stephen McQuay 2015-02-09 22:23:42 -08:00
parent 774307245f
commit dd1e615d14
1 changed files with 15 additions and 0 deletions

15
cmd/smweb/main.go Normal file
View File

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