Use hooks and update dependencies

This commit is contained in:
Jacob Gunther
2023-08-18 20:09:11 -05:00
parent 36425a3c0c
commit 49131e8a8a
3 changed files with 16 additions and 16 deletions

View File

@@ -62,13 +62,17 @@ func init() {
if instanceID, err = GetInstanceID(); err != nil {
panic(err)
}
app.Hooks().OnListen(func(ld fiber.ListenData) error {
log.Printf("Listening on %s:%d\n", conf.Host, conf.Port+instanceID)
return nil
})
}
func main() {
defer r.Close()
log.Printf("Listening on %s:%d\n", conf.Host, conf.Port+instanceID)
if err := app.Listen(fmt.Sprintf("%s:%d", conf.Host, conf.Port+instanceID)); err != nil {
panic(err)
}