main.go 514 B

123456789101112131415161718192021
  1. package main
  2. import (
  3. "github.com/felamaslen/gmus-backend/pkg/config"
  4. "github.com/felamaslen/gmus-backend/pkg/logger"
  5. "github.com/felamaslen/gmus-backend/pkg/read"
  6. "github.com/felamaslen/gmus-backend/pkg/server"
  7. )
  8. func main() {
  9. conf := config.GetConfig()
  10. l := logger.CreateLogger(conf.LogLevel)
  11. l.Info("Watching library for changes")
  12. go read.WatchLibraryRecursive(l, conf.LibraryDirectory)
  13. // This is necessary for the liveness and readiness probes
  14. srv := server.Server{}
  15. srv.Init()
  16. srv.Listen()
  17. }