Web UI: setup wizard, auth pages, library browsing, player, admin, streaming, cover art
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
// Command vibesonic is a self-contained, lightweight music/media server:
|
||||
// server-rendered Bootstrap 5 UI, SQLite storage, and (in later phases) a
|
||||
// Subsonic/OpenSubsonic-compatible API.
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"git.noroutes.net/NoRoutes/vibetunes/internal/app"
|
||||
"git.noroutes.net/NoRoutes/vibetunes/internal/config"
|
||||
)
|
||||
|
||||
var version = "dev"
|
||||
|
||||
func main() {
|
||||
if len(os.Args) > 1 && (os.Args[1] == "-v" || os.Args[1] == "--version" || os.Args[1] == "version") {
|
||||
fmt.Println("vibesonic", version)
|
||||
return
|
||||
}
|
||||
|
||||
log := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: slog.LevelInfo}))
|
||||
|
||||
cfg, err := config.Load()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "vibesonic:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
a, err := app.Open(cfg, log)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "vibesonic:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer a.Close()
|
||||
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer cancel()
|
||||
|
||||
if err := a.Run(ctx); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "vibesonic:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user