server: v0.1.0 basic port 8080

This commit is contained in:
Michael Bobbitt 2025-01-23 22:22:21 -05:00
parent ddf967468f
commit 76e39783d0

View File

@ -1 +1,21 @@
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()
}