main.go 404 Bytes
Newer Older
chenweijian's avatar
chenweijian committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package main

import (
	"fmt"
	"hilo-user/resource/consul"
	"hilo-user/route"
)

const (
	PORT = 9030
)

func main() {
	//cron.Init()                     // 开启定时任务
	//event_s.EventInit()             // 注册事件(内部事件+mysql拟kafka)
	r := route.InitRouter()         // 注册路由
	consul.RegisterToConsul(PORT)   // 服务注册
	r.Run(fmt.Sprintf(":%d", PORT)) // 启动服务
}