X-Git-Url: http://git.pjr.cc/?p=goDBhammer.git;a=blobdiff_plain;f=src%2Fwebconnector.go;h=5fe61aaa090ac9d8bc26a193bdb689345a293be7;hp=546341dec2751495d28f2f1b26c4c954c73a75a5;hb=52618e1a8ebd86ebb31b7109a65cfd5f6f82bf53;hpb=70e916f77d2ccc9b296e53981ccca0c11798e0d5 diff --git a/src/webconnector.go b/src/webconnector.go index 546341d..5fe61aa 100644 --- a/src/webconnector.go +++ b/src/webconnector.go @@ -15,11 +15,18 @@ func HelloServer(c *http.Conn, req *http.Request) { } func main() { - dbibridge.dbiconnect(); - http.Handle("/hello", http.HandlerFunc(HelloServer)); - err := http.ListenAndServe(":12345", nil); - if err != nil { - panic("ListenAndServe: ", err.String()) - } + + var Dbconn *dbibridge.DBConnection; + + Dbconn = dbibridge.DBICreate(); + + dbibridge.DBIConnect(Dbconn, "mysql", "localhost", "root", "password", "zm"); + dbibridge.ExecSQL(Dbconn, "create table asdf (asdf int)"); + dbibridge.DBIDisconnect(Dbconn); + //http.Handle("/hello", http.HandlerFunc(HelloServer)); + //err := http.ListenAndServe(":12345", nil); + //if err != nil { + ////panic("ListenAndServe: ", err.String()) + //} }