package web import ( "path" "git.1750studios.com/ToddShepard/DB640/internal/config" "github.com/gin-gonic/gin" ) // Init intizializes the web server func Init() { r := gin.Default() r.Static("/static", path.Join(config.C.Web.WebDir, "static")) r.GET("/betriebsstellen/", getBetriebsstellen) r.GET("/betriebsstellen/:code", getBetriebsstelleByCode) if config.C.Web.BindUnix { r.RunUnix(config.C.Web.Bind) } else { r.Run(config.C.Web.Bind) } }