将前端dist文件复制到go项目目录下

    1. package main
    2. import (
    3. "github.com/gin-gonic/gin"
    4. "github.com/gin-contrib/static"
    5. )
    6. func main(){
    7. r := gin.Default()
    8. r.Use(static.Serve("/", static.LocalFile("dist", false)))
    9. r.Run(":8083")
    10. }