httpi/server.go

22 lines
262 B
Go

package httpi
import (
"net/http"
)
type Server struct {
httpServer *http.Server
}
func NewServer() *Server {
return &Server{
httpServer: &http.Server{
Addr: ":8080",
},
}
}
func (s *Server) Start() error {
return s.httpServer.ListenAndServe()
}