Mensa-API/server/server.go
2024-09-15 20:36:42 +02:00

21 lines
345 B
Go

package server
import (
"github.com/gin-gonic/gin"
)
func Run() {
gin.SetMode(gin.ReleaseMode)
r := gin.Default()
r.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "Mensen API",
})
})
r.GET("/state/:state", state)
r.GET("/city/:city", city)
r.GET("/mensa/:city/:mensa", mensa)
r.Run(":80")
}