X-Git-Url: http://git.pjr.cc/?p=goDBhammer.git;a=blobdiff_plain;f=src%2Fwebconnector.go;h=a579966fc6cef1ed31a630a0f10759735d5fff86;hp=c64e0bd9ea9377a3e7431d23999391b025d3fb25;hb=b349b3785350a2295c0252eac5ac46987744c1ae;hpb=87ec29face97b3bce825a0b14aa3199bf9852604 diff --git a/src/webconnector.go b/src/webconnector.go index c64e0bd..a579966 100644 --- a/src/webconnector.go +++ b/src/webconnector.go @@ -15,13 +15,57 @@ var comin chan int; var comout chan int; // hello world, the web server -func HelloServer(c *http.Conn, req *http.Request) { - comout <- 1; - io.WriteString(c, "
"); + fmt.Printf("%s\n", req.FormValue("dbhost")); + footer(c); +} + +func header(c *http.Conn) +{ + io.WriteString(c, ""); +} + +func footer(c *http.Conn) +{ + io.WriteString(c, ""); } func main() { @@ -40,7 +84,7 @@ func main() { bc := benchcontroller.CreateController(); go benchcontroller.MainLoop(bc, comout, comin); - http.Handle("/hello", http.HandlerFunc(HelloServer)); + http.Handle("/", http.HandlerFunc(ServerResponder)); err := http.ListenAndServe(":12345", nil); if err != nil { panic("ListenAndServe: ", err.String())