package main

import (
	"git.keks.cloud/kekskurse/miniauth/pkg/web"
	"github.com/gin-gonic/gin"
)

func main() {
	router := setupRouter()
	router.Run(":8080")
}

func setupRouter() *gin.Engine {
	router := gin.Default()
	routesWeb := router.Group("/web")

	webServer := web.NewWeb()
	webServer.RegisterRoutes(routesWeb)

	router.GET("/", func(c *gin.Context) {})
	router.GET("/ping", func(c *gin.Context) { c.String(200, "pong") })

	return router
}
