You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
372 B
19 lines
372 B
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
router := gin.Default()
|
|
router.LoadHTMLGlob("templates/*")
|
|
router.StaticFS("/static", http.Dir("./files"))
|
|
router.GET("/index", func(c *gin.Context) {
|
|
c.HTML(http.StatusOK, "index.tmpl", gin.H{
|
|
"title": "CRUNK",
|
|
})
|
|
})
|
|
router.Run(":5000") // listen and serve on localhost:5000
|
|
}
|
|
|