update
This commit is contained in:
@ -2,8 +2,8 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rouggy.com/rouggy/RaceBot/config"
|
||||
"git.rouggy.com/rouggy/RaceBot/controllers"
|
||||
"git.rouggy.com/rouggy/RaceBot/internal/domain"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -17,11 +17,11 @@ func NewServer(listenAddr string) *Server {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) Start() error {
|
||||
func (s *Server) Start(cfg *domain.Config) error {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
r := gin.Default()
|
||||
s.SetupRoutes(r)
|
||||
fmt.Println("Server is running on port:", config.HTTPPort)
|
||||
fmt.Println("Server is running on port:", cfg.Port)
|
||||
err := r.Run(s.listenAddr)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user