package http

type Server struct {
	httpServer *httpserver.Server
	handler    *Handler
}

func NewServer(httpServer *httpserver.Server, handler *Handler) *Server {
	return &Server{
		httpServer: httpServer,
		handler:    handler,
	}
}

func (s *Server) Serve() error {
	s.registerRoutes()
	return s.httpServer.Start()
}

func (s *Server) Stop() error {
	return s.httpServer.Stop()
}
