@ -2,7 +2,6 @@ package api
import (
"encoding/base64"
"encoding/gob"
"encoding/json"
"fmt"
"log"
@ -32,9 +31,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
s.Exit.RLock()
defer s.Exit.RUnlock()
gob.Register([]interface{}{})
gob.Register(map[string]interface{}{})
if s.Debug {
w.Header().Set("Access-Control-Allow-Headers", "*")
w.Header().Set("Access-Control-Allow-Methods", "*")
@ -1,6 +1,7 @@
package main
"flag"
"net"
@ -29,6 +30,11 @@ func main() {
flag.Parse()
// register gob types
// get database connection
err := db.Init(*dbuser, *dbpass, *dbproto, *dbaddr, *dbname)
if err != nil {