From c6240a0578d0a9608298cc1bd0ef59cfea855741 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 12 Jun 2021 13:37:27 +0200 Subject: [PATCH] updated startup --- main.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index a823d00..b0f3bb3 100644 --- a/main.go +++ b/main.go @@ -24,10 +24,8 @@ package main import ( "git.umbach.dev/app-idea/rest-api/modules/config" "git.umbach.dev/app-idea/rest-api/modules/database" - "git.umbach.dev/app-idea/rest-api/modules/serversettings" "git.umbach.dev/app-idea/rest-api/routers/router" - _ "github.com/go-sql-driver/mysql" "github.com/gofiber/fiber/v2" log "github.com/sirupsen/logrus" ) @@ -37,18 +35,17 @@ func main() { config.LoadConfig() - cfg := config.GetConfig() + cfg := &config.Cfg.Server - if cfg.Server.Debug { + if cfg.Debug { log.SetLevel(log.DebugLevel) } router.SetupRoutes(app) database.InitDatabase() - serversettings.LoadServerSettings() - app.Listen(cfg.Server.Host) + app.Listen(cfg.Host) } /*