|
@@ -28,6 +28,7 @@ func main() {
|
|
|
conf.MustLoad(*configFile, &c)
|
|
|
ctx := svc.NewServiceContext(c)
|
|
|
srv := server.NewBiServiceServer(ctx)
|
|
|
+ logx.MustSetup(c.Logx)
|
|
|
entity.PublicKey = c.PublicKey
|
|
|
entity.InitMysql(c.Mysql.JianYu, c.Mysql.JyDoc, c.Mysql.Bi, c.Mysql.Tidb, c.Mysql.BiTidb, c.Mysql.CallTidb, c.Mysql.BiService)
|
|
|
entity.InitMail(c.Mail)
|
|
@@ -56,7 +57,6 @@ func main() {
|
|
|
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
|
|
pb.RegisterBiServiceServer(grpcServer, srv)
|
|
|
})
|
|
|
- logx.MustSetup(c.Logx)
|
|
|
defer s.Stop()
|
|
|
|
|
|
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
|