You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
981 B
26 lines
981 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskconfig"
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskgin"
|
|
"git.ouxuan.net/hasaki-service/hasaki-service-stadium-core/hasaki_stadium_core"
|
|
"git.ouxuan.net/hasaki-service/hasaki-service-stadium-core/hasaki_stadium_core_event"
|
|
"git.ouxuan.net/hasaki-service/hasaki-service-{{.app_name}}/hasaki_{{.app_name}}"
|
|
"git.ouxuan.net/hasaki-service/hasaki-service-{{.app_name}}/hasaki_{{.app_name}}_options"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
hskconfig.SetGolbalConfigFileName(`./config.json`)
|
|
config := hskconfig.GetGlobalConfigInstance()
|
|
router := hskgin.NewGinHelper(gin.Default())
|
|
hasaki_{{.app_name}}_options.GetMysqlConfig = hasaki_stadium_core.GetMysqlConfig
|
|
hasaki_stadium_core_event.Initialize(true)
|
|
hasaki_{{.app_name}}.AdminInitialize(router)
|
|
hasaki_{{.app_name}}.Initialize(router)
|
|
err := router.Run(fmt.Sprintf("%s:%d", config.Addr, config.Port))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|