diff --git a/cmd/ipbl/ipbl.go b/cmd/ipbl/ipbl.go index 3301ae1..6f1ec01 100644 --- a/cmd/ipbl/ipbl.go +++ b/cmd/ipbl/ipbl.go @@ -6,6 +6,9 @@ import ( "log" "os" + "net/http" + _ "net/http/pprof" + "git.paulbsd.com/paulbsd/ipbl/src/config" "git.paulbsd.com/paulbsd/ipbl/src/database" "git.paulbsd.com/paulbsd/ipbl/src/models" @@ -37,6 +40,12 @@ func main() { go models.ScanIP(&cfg) } + if cfg.Switchs.Debug { + go func() { + log.Println(http.ListenAndServe("localhost:6060", nil)) + }() + } + ws.Init(&cfg) go func() { err = routers.RunServer(&ctx, &cfg) }() if err != nil { diff --git a/src/routers/funcs.go b/src/routers/funcs.go index 6524909..56c2f55 100644 --- a/src/routers/funcs.go +++ b/src/routers/funcs.go @@ -15,11 +15,14 @@ import ( func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) { e.GET("/", func(c echo.Context) error { - return c.HTML(http.StatusOK, ` - -

Welcome to ipbl software (https://git.paulbsd.com/paulbsd/ipbl)

- - `) + return c.HTML(http.StatusOK, ` + + + +

Welcome to ipbl software (https://git.paulbsd.com/paulbsd/ipbl)

+ + +`) }) e.GET("/health", func(c echo.Context) error {