Skip to content

Commit

Permalink
fix: load configuration before use (#140)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 authored Sep 23, 2024
1 parent 68dd205 commit e4a7082
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import (
)

func Run(logger *slog.Logger) error {
cfg := config.GetConfig()
cfg, err := config.LoadConfig()
if err != nil {
return err
}
logger.Info(fmt.Sprintf("loaded config: %+v", cfg))
l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", cfg.BindAddr, cfg.Port))
if err != nil {
Expand Down

0 comments on commit e4a7082

Please sign in to comment.