Reorganized the code, moved more things to the new part

This commit is contained in:
2025-01-13 16:08:54 +01:00
parent 034ba35fbb
commit 5b640375c3
38 changed files with 213 additions and 2028 deletions

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"log"
"music-server/internal/server"
"music-server/pkg/conf"
"music-server/pkg/db"
"net/http"
"os/signal"
"syscall"
@@ -21,7 +21,7 @@ func gracefulShutdown(apiServer *http.Server, done chan bool) {
<-ctx.Done()
log.Println("shutting down gracefully, press Ctrl+C again to force")
conf.CloseDb()
db.CloseDb()
// The context is used to inform the server it has 5 seconds to finish
// the request it is currently handling