final project structure

This commit is contained in:
2025-04-15 22:36:22 +02:00
parent d6b3e88b5f
commit 284a40fac2
65 changed files with 668 additions and 447 deletions

View File

@@ -4,7 +4,6 @@ import (
"log"
"os"
"wagfarm-api/database"
"wagfarm-api/routes"
"github.com/gin-gonic/gin"
)
@@ -26,6 +25,10 @@ func initLogging() {
gin.DefaultWriter = f // capture Gin logs too
}
func RegisterRoutes(r *gin.Engine) {
}
func main() {
initLogging()
@@ -44,7 +47,7 @@ func main() {
log.Println("Database migrated successfully!")
r := gin.Default()
routes.RegisterRoutes(r)
RegisterRoutes(r)
if err := r.Run(":8080"); err != nil {
log.Fatalf("Failed to run server: %v", err)