MCPcopy Create free account
hub / github.com/coder/agentapi / Start

Method Start

lib/httpapi/server.go:618–626  ·  view source on GitHub ↗

Start starts the HTTP server

()

Source from the content-addressed store, hash-verified

616
617// Start starts the HTTP server
618func (s *Server) Start() error {
619 addr := fmt.Sprintf(":%d", s.port)
620 s.srv = &http.Server{
621 Addr: addr,
622 Handler: s.router,
623 }
624
625 return s.srv.ListenAndServe()
626}
627
628// Stop gracefully stops the HTTP server. It is safe to call multiple times.
629func (s *Server) Stop(ctx context.Context) error {

Callers 1

runServerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected