28 lines
446 B
Go
28 lines
446 B
Go
package main
|
|
|
|
import (
|
|
"git.umbach.dev/app-idea/mailer/modules/config"
|
|
"git.umbach.dev/app-idea/mailer/modules/mailer"
|
|
"git.umbach.dev/app-idea/mailer/routers/router"
|
|
"github.com/gofiber/fiber/v2"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func main() {
|
|
app := fiber.New()
|
|
|
|
config.LoadConfig()
|
|
|
|
cfg := &config.Cfg.Server
|
|
|
|
if cfg.Debug {
|
|
log.SetLevel(log.DebugLevel)
|
|
}
|
|
|
|
mailer.InitMailer()
|
|
|
|
router.SetupRoutes(app)
|
|
|
|
app.Listen(cfg.Host)
|
|
}
|