Skip to content

Instantly share code, notes, and snippets.

@qweliant
Created January 21, 2021 18:36
Show Gist options
  • Select an option

  • Save qweliant/6ba098399118660b3b12d8ed9dd7617e to your computer and use it in GitHub Desktop.

Select an option

Save qweliant/6ba098399118660b3b12d8ed9dd7617e to your computer and use it in GitHub Desktop.
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