24 lines
368 B
Go
Raw Normal View History

2017-07-18 01:55:47 +00:00
package main
import (
"flag"
"log"
"net/http"
)
func refreshAvatar(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("ok"))
}
var port = "8001"
func init() {
flag.StringVar(&port, "port", "", "Port the HTTP server should listen on")
flag.Parse()
}
func main() {
http.HandleFunc("/", refreshAvatar)
log.Fatal(http.ListenAndServe(":"+port, nil))
}