Merge branch 'FlexiDB'

This commit is contained in:
2025-07-24 07:39:43 +02:00
parent 1ef16940e6
commit 20659fa5f6
3647 changed files with 15892 additions and 1376968 deletions
+41
View File
@@ -0,0 +1,41 @@
package main
import (
"bamort/character"
"bamort/database"
"bamort/gsmaster"
"bamort/importer"
"bamort/maintenance"
"bamort/router"
"github.com/gin-gonic/gin"
)
// @title Bamort API
// @version 1
// @description This is the API for Bamort
// @host localhost:8180
// @BasePath /
// @schemes http
func main() {
database.ConnectDatabase()
//database.DB.AutoMigrate(&models.User{}, &models.Character{}) // Add other models here
// Migrate Audit-Log table
if err := character.MigrateAuditLog(); err != nil {
panic("Failed to migrate audit log table: " + err.Error())
}
r := gin.Default()
router.SetupGin(r)
// Routes
protected := router.BaseRouterGrp(r)
// Register your module routes
gsmaster.RegisterRoutes(protected)
character.RegisterRoutes(protected)
maintenance.RegisterRoutes(protected)
importer.RegisterRoutes(protected)
r.Run(":8180") // Start server on port 8080
}