itltf512116 7a6df3abd3
Tuoyun 新增单容器单进程的部署方式 (#103)
* feat 新增deploy:单容器单进程模型部署

* feat 新增openim内部各组件的host名称配置;
fix 独立容器部署镜像文档;

* feat 新增注释说明
2021-12-17 10:49:01 +08:00

30 lines
651 B
Go

package main
import (
"Open_IM/internal/demo/register"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"flag"
"strconv"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
r.Use(utils.CorsHandler())
authRouterGroup := r.Group("/auth")
{
authRouterGroup.POST("/code", register.SendVerificationCode)
authRouterGroup.POST("/verify", register.Verify)
authRouterGroup.POST("/password", register.SetPassword)
authRouterGroup.POST("/login", register.Login)
}
log.NewPrivateLog("demo")
ginPort := flag.Int("port", 42233, "get ginServerPort from cmd,default 42233 as port")
flag.Parse()
r.Run(":" + strconv.Itoa(*ginPort))
}