main.go 559 Bytes
Newer Older
chenweijian's avatar
chenweijian committed
1 2 3 4
package main

import (
	"fmt"
hujiebin's avatar
hujiebin committed
5
	"git.hilo.cn/hilo-common/resource/consul"
chenweijian's avatar
chenweijian committed
6 7 8 9
	"hilo-user/route"
)

const (
hujiebin's avatar
hujiebin committed
10 11 12
	PORT         = 9040
	RegisterName = "hiloUser"
	RegisterTag  = "用户中心"
chenweijian's avatar
chenweijian committed
13 14 15 16 17
)

func main() {
	//cron.Init()                     // 开启定时任务
	//event_s.EventInit()             // 注册事件(内部事件+mysql拟kafka)
hujiebin's avatar
hujiebin committed
18 19 20
	r := route.InitRouter()                                  // 注册路由
	consul.RegisterToConsul(PORT, RegisterName, RegisterTag) // 服务注册
	r.Run(fmt.Sprintf(":%d", PORT))                          // 启动服务
chenweijian's avatar
chenweijian committed
21
}