mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 23:40:05 +00:00
the start of the go backend
This commit is contained in:
30
go-backend/main.go
Normal file
30
go-backend/main.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user