feat: add config loader
Docker Build and Push / Build and Push Docker Image (push) Successful in 13m50s

This commit is contained in:
2026-02-22 02:23:48 +07:00
parent d4df4db22e
commit 7eb25718db
3 changed files with 84 additions and 19 deletions
+3 -3
View File
@@ -11,12 +11,12 @@ import (
type Server struct {
addr string
port uint16
port string
repository *repository.Queries
jwt *jwt.JWT
}
func New(addr string, port uint16, repository *repository.Queries, jwt *jwt.JWT) *Server {
func New(addr string, port string, repository *repository.Queries, jwt *jwt.JWT) *Server {
return &Server{
addr: addr,
port: port,
@@ -55,7 +55,7 @@ func router(repository *repository.Queries, jwt *jwt.JWT) *http.ServeMux {
func (s *Server) Start() error {
r := router(s.repository, s.jwt)
hs := &http.Server{
Addr: fmt.Sprintf("%s:%d", s.addr, s.port),
Addr: fmt.Sprintf("%s:%s", s.addr, s.port),
Handler: middleware.Handler(middleware.CORS(r)),
}