package main import ( "log" "git.hackmi.ch/Phil/goshorly/db" "git.hackmi.ch/Phil/goshorly/routes" "git.hackmi.ch/Phil/goshorly/utils" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/limiter" ) func main() { utils.Print_Starting_Screen() utils.Init_env_file() utils.Init_env_vars() utils.Init_build_vars() db.Init_redis() app := fiber.New(fiber.Config{ CaseSensitive: true, }) app.Get("/", routes.Gethome) if utils.ESTATS == "true" { app.Get("/stats", routes.GetStats) } app.Get("/:id", routes.ID) app.Use(limiter.New(utils.ConfigLimiter)) app.Post("/", routes.Posthome) log.Fatal(app.Listen(":" + utils.PORT)) }