the start of the go backend

This commit is contained in:
2025-02-02 03:54:03 +01:00
parent bc353a90e7
commit ee7cf10b28
7 changed files with 638 additions and 0 deletions

30
go-backend/main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"fmt"
"log"
"github.com/joho/godotenv"
"github.com/juli0n21/go-osu-parser/parser"
)
func main() {
filename := "/mnt/g/Anwendungen/osu!/osu!.db"
if err := godotenv.Load(); err != nil {
fmt.Println("Error loading .env file")
}
osuDb, err := parser.ParseOsuDB(filename)
if err != nil {
log.Fatal(err)
}
db, err := initDB("./data/music.db", osuDb)
if err != nil {
log.Fatal(err)
}
run(db, osuDb)
}