allowances/main.go

20 lines
402 B
Go

package main
import (
"flag"
"log"
"net/http"
)
var addr = flag.String("addr", ":8000", "http service address")
var static_files = flag.String("static", "./static", "static files")
func main() {
flag.Parse()
http.Handle("/s/", http.StripPrefix("/s/",
http.FileServer(http.Dir(*static_files))))
if err := http.ListenAndServe(*addr, nil); err != nil {
log.Fatal("ListenAndServe:", err)
}
}