add basic demo data

This commit is contained in:
Artlef
2025-09-22 21:10:38 +02:00
parent 232cd49052
commit 0457ca2011
3 changed files with 43 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ func GetBookHandler(c *gin.Context, db *gorm.DB) {
func main() {
c := config.LoadConfig("plm.toml")
db := db.Initdb(".")
db := db.Initdb(".", c.DemoDataPath)
r := gin.Default()
r.Use(cors.Default()) // All origins allowed by default
r.GET("/books", func(c *gin.Context) {