From 0d5896b3e8562c0991c3ec6dbdc3004362cd79ba Mon Sep 17 00:00:00 2001 From: topheruk Date: Wed, 3 Aug 2022 17:04:12 +0000 Subject: [PATCH] resolves #1 --- cmd/server/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 1563bc9e..041bb247 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1,12 +1,18 @@ package main import ( + "log" "net/http" "github.com/rog-golang-buddies/rapidmidiex/www" ) func main() { - // Feel free to delete this file. - http.ListenAndServe(":8081", www.NewService()) + if err := run(); err != nil { + log.Fatalln(err) + } +} + +func run() error { + return http.ListenAndServe(":8081", www.NewService()) }