package main import ( "log" "net/http" "github.com/gorilla/mux" ) func notFoundStub(w http.ResponseWriter, r *http.Request) { err := YggError{Code: 404, Error: "Not Found", ErrorMessage: "The server has not found anything matching the request URI"} sendError(w, err) } func handleRequests() { r := mux.NewRouter().StrictSlash(true) registerEndpoints(r) log.Fatal(http.ListenAndServe(":10000", r)) } func main() { initDB() handleRequests() defer DB.Close() }