updated startup

master
Alex 2021-06-12 13:37:27 +02:00
parent c69bbc0a47
commit c6240a0578
1 changed files with 3 additions and 6 deletions

View File

@ -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)
}
/*