feat: Update internal HTTP server to use Fiber v2 with new routes and middleware configuration
This commit is contained in:
20
internal/http/server.go
Normal file
20
internal/http/server.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||
)
|
||||
|
||||
func StartService() {
|
||||
app := fiber.New()
|
||||
|
||||
// Add Logger
|
||||
app.Use(logger.New(logger.Config{
|
||||
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
|
||||
}))
|
||||
|
||||
// Configure Routes
|
||||
app = configureRoutes(app)
|
||||
|
||||
app.Listen(":3000")
|
||||
}
|
Reference in New Issue
Block a user