|
|
@ -6,12 +6,17 @@ import (
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
"Open_IM/pkg/utils"
|
|
|
|
"Open_IM/pkg/utils"
|
|
|
|
"flag"
|
|
|
|
"flag"
|
|
|
|
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"os"
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
gin.SetMode(gin.ReleaseMode)
|
|
|
|
|
|
|
|
f, _ := os.Create("../logs/api.log")
|
|
|
|
|
|
|
|
gin.DefaultWriter = io.MultiWriter(f)
|
|
|
|
|
|
|
|
|
|
|
|
r := gin.Default()
|
|
|
|
r := gin.Default()
|
|
|
|
r.Use(utils.CorsHandler())
|
|
|
|
r.Use(utils.CorsHandler())
|
|
|
|