拆分战斗服务器

This commit is contained in:
huangxiaolei
2022-12-19 22:11:55 +08:00
parent cf4804c444
commit 0dc45708d6
21 changed files with 793 additions and 349 deletions

View File

@@ -0,0 +1,8 @@
[logger]
level = "DEBUG"
mode = "BOTH"
track = true
max_size = 10485760
[mq]
nats_url = "nats://nats:4222"

25
cmd/fight/main.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"context"
"flag"
"fmt"
_ "net/http/pprof"
"os"
"hk4e/fight/app"
)
var (
config = flag.String("config", "application.toml", "config file")
)
func main() {
flag.Parse()
// go statsviz_serve.Serve("0.0.0.0:2345")
err := app.Run(context.TODO(), *config)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}