Mercurial > public > pacobot
view main.go @ 12:aaf85ae1f942
add very simple html template
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Thu, 20 Mar 2025 11:12:21 +0000 |
parents | 5c124578fed2 |
children |
line wrap: on
line source
package main import ( "github.com/denniscmcom/pacobot/api" "github.com/denniscmcom/pacobot/app" "github.com/gin-gonic/gin" ) func main() { gin.SetMode(gin.DebugMode) r := gin.Default() r.LoadHTMLGlob("./www/**/*.html") r.Static("/static", "./www/static") r.GET("/", app.Index) { apiG := r.Group("/api") apiG.GET("/user", api.GetUser) apiG.GET("/connect", api.Connect) { authG := apiG.Group("/auth") authG.GET("/", api.Auth) authG.GET("/validate", api.AuthValidate) authG.GET("/refresh", api.AuthRefresh) authG.GET("/revoke", api.AuthRevoke) authG.GET("/twitch", api.Twitch) } } r.Run() }