package main import ( "log" "net/http" personalpropsroute "personalwebsite/approutes/personalPropsRoute" "github.com/gin-gonic/gin" ) func main() { router := gin.New() // router.Use(rateLimit, gin.Recovery()) router.LoadHTMLGlob("resources/*.html") // router.Static("/static", "resources/static") router.Static("/res", "resources") router.GET("/", index) router.GET("/getmockapp", func(ctx *gin.Context) { }) apps := router.Group("applications") { personalpropsroute.Route(apps.Group("/personalproperties")) } // router.GET("/room/:roomid", roomGET) // router.POST("/room-post/:roomid", roomPOST) // router.GET("/stream/:roomid", streamRoom) // port := os.Getenv("PORT") // if port == "" { // port = "8080" // } if err := router.Run(":8080"); err != nil { log.Panicf("error: %s", err) } } func index(c *gin.Context) { c.HTML(http.StatusOK, "base.html", nil) }