I don't even remember this crap
This commit is contained in:
parent
8dfd42a53f
commit
2dc819088c
@ -11,8 +11,8 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
server := newCrispyServer()
|
server := newCrispyServer()
|
||||||
http.Handle("/", server)
|
http.Handle("/", server)
|
||||||
log.Printf("Serving on :9764 with %+v\n", server)
|
log.Printf("Serving on :9799 with %+v\n", server)
|
||||||
log.Fatal(http.ListenAndServe(":9764", nil))
|
log.Fatal(http.ListenAndServe(":9799", nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
type crispyServer struct {
|
type crispyServer struct {
|
||||||
@ -26,6 +26,10 @@ func newCrispyServer() *crispyServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (me *crispyServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
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)
|
j, err := json.Marshal(r)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
me.logstasher.Println(string(j))
|
me.logstasher.Println(string(j))
|
||||||
|
@ -15,8 +15,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
http.Handle("/", server)
|
http.Handle("/", server)
|
||||||
log.Printf("Serving on :9764 with %+v\n", server)
|
log.Printf("Serving on :9799 with %+v\n", server)
|
||||||
log.Fatal(http.ListenAndServe(":9764", nil))
|
log.Fatal(http.ListenAndServe(":9799", nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
type crispyServer struct {
|
type crispyServer struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user