mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-27 12:08:52 +08:00
config path
This commit is contained in:
parent
ffaf0bd021
commit
cfe6aff3ac
@ -17,12 +17,14 @@ func main() {
|
|||||||
log.NewPrivateLog(constant.LogFileName)
|
log.NewPrivateLog(constant.LogFileName)
|
||||||
router := api.NewGinRouter()
|
router := api.NewGinRouter()
|
||||||
go third.MinioInit()
|
go third.MinioInit()
|
||||||
ginPort := flag.Int("port", config.Config.Api.GinPort[0], "get ginServerPort from cmd,default 10002 as port")
|
|
||||||
configPath := flag.String("config_path", "../config/", "config folder")
|
configPath := flag.String("config_path", "../config/", "config folder")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if err := config.InitConfig(*configPath); err != nil {
|
if err := config.InitConfig(*configPath); err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ginPort := flag.Int("port", config.Config.Api.GinPort[0], "get ginServerPort from cmd,default 10002 as port")
|
||||||
|
flag.Parse()
|
||||||
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
|
address := "0.0.0.0:" + strconv.Itoa(*ginPort)
|
||||||
if config.Config.Api.ListenIP != "" {
|
if config.Config.Api.ListenIP != "" {
|
||||||
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
|
address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort)
|
||||||
|
@ -8,6 +8,6 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
startrpc.Start(config.Config.RpcPort.OpenImUserPort[0], config.Config.RpcRegisterName.OpenImUserName, config.Config.Prometheus.UserPrometheusPort[0], user.Start)
|
startrpc.Start(config.Config.RpcPort.OpenImUserPort, config.Config.RpcRegisterName.OpenImUserName, config.Config.Prometheus.UserPrometheusPort[0], user.Start)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user