blob: 9a84f7bb0dfd31ecbb34793b318c5f7129234b7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package main
import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/contrib/static"
)
func main() {
myRouter := gin.Default()
myRouter.Use(gin.Logger())
// serve static front end on /
myRouter.Use(static.Serve("/",
static.LocalFile("./app", true)))
myRouter.Run(":8080")
}
|