This commit is contained in:
2025-11-03 00:48:16 +01:00
parent ed18be9fbd
commit eb2c8fea64
7 changed files with 229 additions and 6 deletions

27
network/http/server.go Normal file
View File

@@ -0,0 +1,27 @@
package http
import (
"go_oxspeak_server/network/http/handlers"
"github.com/gin-gonic/gin"
)
type Server struct {
router *gin.Engine
addr string
}
func NewServer(addr string) *Server {
router := handlers.CreateRouter()
s := &Server{
router: router,
addr: addr,
}
return s
}
func (s *Server) Start() error {
return s.router.Run(s.addr)
}