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.
37 lines
734 B
37 lines
734 B
package main
|
|
|
|
import (
|
|
"epur-pay/cache"
|
|
"epur-pay/pkg/async"
|
|
"epur-pay/pkg/config"
|
|
"epur-pay/pkg/cron"
|
|
"epur-pay/pkg/dapi"
|
|
"epur-pay/pkg/mq"
|
|
"epur-pay/pkg/server"
|
|
"epur-pay/router"
|
|
"flag"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
|
|
RunMode := flag.String("run_mode", "debug", "run_mode [debug|test|release]")
|
|
flag.Parse()
|
|
|
|
app := server.NewApp(*RunMode, "pay")
|
|
app.LoadDB().LoadRedis().LoadCron().LoadMq().LoadCustomApp(func() {
|
|
cache.New()
|
|
dapi.New()
|
|
cron.New()
|
|
//fileserver.New()
|
|
go func() {
|
|
for !cache.Global.ProjectInitStatus {
|
|
time.Sleep(100 * time.Millisecond)
|
|
}
|
|
async.New()
|
|
mq.AysncInstance.Listen()
|
|
}()
|
|
}).AddServerApp(config.Cf.ApiServer, router.Router()).
|
|
ListenServerApp().WaitServerAppListen()
|
|
}
|