box-o-sand/html5/server.go
Dan Buch 250bfbdfa0 Goofing around with html5 canvas again
to make sure I'm not missing anything big by mostly using svg (in d3).
2013-02-10 18:16:30 -05:00

23 lines
450 B
Go

// I wanted to practice, plus maaaaaybe I'll want something dynamic on the
// server side (???)
package main
import (
"flag"
"fmt"
"net/http"
)
var (
docroot = flag.String("d", ".", "docroot for server")
addr = flag.String("a", ":8990", "address on which to listen")
)
func main() {
flag.Parse()
http.Handle("/", http.FileServer(http.Dir(*docroot)))
fmt.Printf("Serving %q on %v\n", *docroot, *addr)
http.ListenAndServe(*addr, nil)
}