Files
hk4e-go/cmd/node/main.go
T
2023-11-16 21:35:51 +08:00

29 lines
383 B
Go

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