I don't even remember this crap

This commit is contained in:
Dan Buch 2014-09-20 09:39:22 -05:00
parent 8dfd42a53f
commit 2dc819088c
2 changed files with 8 additions and 4 deletions

View File

@ -11,8 +11,8 @@ import (
func main() {
server := newCrispyServer()
http.Handle("/", server)
log.Printf("Serving on :9764 with %+v\n", server)
log.Fatal(http.ListenAndServe(":9764", nil))
log.Printf("Serving on :9799 with %+v\n", server)
log.Fatal(http.ListenAndServe(":9799", nil))
}
type crispyServer struct {
@ -26,6 +26,10 @@ func newCrispyServer() *crispyServer {
}
func (me *crispyServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/DIE" && r.Method == "POST" {
me.logstasher.Fatal("OH GOSH")
}
j, err := json.Marshal(r)
if err == nil {
me.logstasher.Println(string(j))

View File

@ -15,8 +15,8 @@ func main() {
}
http.Handle("/", server)
log.Printf("Serving on :9764 with %+v\n", server)
log.Fatal(http.ListenAndServe(":9764", nil))
log.Printf("Serving on :9799 with %+v\n", server)
log.Fatal(http.ListenAndServe(":9799", nil))
}
type crispyServer struct {