Created
January 21, 2021 18:36
-
-
Save qweliant/6ba098399118660b3b12d8ed9dd7617e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func main() { | |
| r := gin.Default() | |
| mainPage := "../html/index.html" | |
| oauthPage := "../html/oauth-response.html" | |
| r.LoadHTMLFiles(mainPage, oauthPage) | |
| r.Static("/static", "../static") | |
| r.POST("/api/info", info) | |
| r.GET("/", func(c *gin.Context) { | |
| c.HTML(http.StatusOK, "index.html", gin.H{}) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment