func main() { settings.Init() router := routers.InitRoutes() n := negroni.Classic() n.UseHandler(router) http.ListenAndServe(":5000", n) }
func (db *Db_sessions) NewHttpServer(address string, port int) *http.Server { router := routers.InitRoutes(db.mongo_session, db.mysql_session) listener := &http.Server{ Addr: fmt.Sprintf("%s:%d", address, port), Handler: router, } logging.Logger.Info("Server started") return listener }