midr @ f13a07aa433298de91e1c4aff68f72be6d851be2

 1package routes
 2
 3import (
 4	"github.com/gin-gonic/gin"
 5	"gitlab.com/gabrielgio/midr/controller"
 6)
 7
 8func HandleRequests() {
 9	r := gin.Default()
10	r.LoadHTMLGlob("templates/*")
11	r.GET("/", controller.GetEntries)
12	r.GET("entries/", controller.GetEntry)
13	r.POST("entries/", controller.CreateEntry)
14	r.GET("entries/:id", controller.GetEntry)
15	r.POST("entries/:id", controller.UpdateEntry)
16	r.DELETE("entries/:id", controller.DeleteEntry)
17	r.Run(":8000")
18}