diff --git a/main.go b/main.go index b636e53..a24b119 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,8 @@ var ( statsfile = flag.String("statsfile", "build/stats.json", "file to store stats in") host = flag.String("host", "127.0.0.1", "host to serve on") port = flag.String("port", "9696", "port to serve on") - i2p = flag.Bool("i2p", false, "automatically co-host on an I2P service using SAMv3") + i2p = flag.Bool("i2p", true, "automatically co-host on an I2P service using SAMv3") + tcp = flag.Bool("http", true, "host on an HTTP service at host:port") ) func validatePort(s *string) { @@ -109,11 +110,13 @@ func main() { switch command { case "serve": s := server.Serve(*dir, *statsfile) - go func() { - if err := Serve(*host, *port, s); err != nil { - panic(err) - } - }() + if *tcp { + go func() { + if err := Serve(*host, *port, s); err != nil { + panic(err) + } + }() + } if *i2p { go func() { if err := ServeI2P(s); err != nil { diff --git a/server/stats/stats.go b/server/stats/stats.go index 6344e32..d40a814 100644 --- a/server/stats/stats.go +++ b/server/stats/stats.go @@ -25,7 +25,7 @@ func (n *NewsStats) Graph(rw http.ResponseWriter) { total += v bars = append(bars, chart.Value{Value: float64(v), Label: k}) } - bars = append(bars, chart.Value{Value: float64(total), Label: "Total Requests"}) + bars = append(bars, chart.Value{Value: float64(total), Label: "Total Requests / Approx. Updates Handled"}) graph := chart.BarChart{ Title: "Downloads by language",