func (s *Server) ListenAndServe() error {
	if s.GraceTimeout <= 0 {
		return s.listenAndServe()
	}
	errChan := make(chan error)
	go func() {
		if err := s.listenAndServe(); err != http.ErrServerClosed {
			errChan <- err
		}
	}()
	shutdown := make(chan os.Signal, 1)
	signal.Notify(shutdown, syscall.SIGTERM)
	select {
	case err := <-errChan:
		return err
	case <-shutdown:
		return s.Shutdown()
	}
}
ListenAndServe starts web server
package parapet
import (
	"context"
	"crypto/tls"
	"log"
	"net"
	"net/http"
	"os"
	"os/signal"
	"sync"
	"syscall"
	"time"
	"github.com/kavu/go_reuseport"
	"golang.org/x/net/http2"
	"golang.org/x/net/http2/h2c"
)
type Server struct {
	s          http.Server
	once       sync.Once
	trackState sync.Once
	ms         Middlewares
	onShutdown []func()
	modifyConn []func(conn net.Conn) net.Conn
	Addr               string
	Handler            http.Handler
	ReadTimeout        time.Duration
	ReadHeaderTimeout  time.Duration
	WriteTimeout       time.Duration
	IdleTimeout        time.Duration
	TCPKeepAlivePeriod time.Duration
	GraceTimeout       time.Duration
	WaitBeforeShutdown time.Duration
	ErrorLog           *log.Logger
	TrustProxy         Conditional
	H2C                bool
	ReusePort          bool
	ConnState          func(conn net.Conn, state http.ConnState)
	TLSConfig          *tls.Config
}
type serverContextKey struct{}
var ServerContextKey = serverContextKey{}
func (s *Server) Use(m Middleware) {
	if s.s.Handler != nil {
		panic("parapet: can not use after serve")
	}
	s.ms.Use(m)
}
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	s.configHandler()
	s.s.Handler.ServeHTTP(w, r)
}
func (s *Server) configServer() {
	s.configHandler()
	s.s.Addr = s.Addr
	s.s.ConnState = s.ConnState
	s.s.ReadTimeout = s.ReadTimeout
	s.s.ReadHeaderTimeout = s.ReadHeaderTimeout
	s.s.WriteTimeout = s.WriteTimeout
	s.s.IdleTimeout = s.IdleTimeout
	s.s.ErrorLog = s.ErrorLog
	s.s.TLSConfig = s.TLSConfig
}
func (s *Server) configHandler() {
	s.once.Do(func() {
		h := s.ms.ServeHandler(s.Handler)
		h = &proxy{
			Trust:   s.TrustProxy,
			Handler: h,
		}
		h = func(h http.Handler) http.HandlerFunc {
			return func(w http.ResponseWriter, r *http.Request) {
				ctx := context.WithValue(r.Context(), ServerContextKey, s)
				h.ServeHTTP(w, r.WithContext(ctx))
			}
		}(h)
		if s.H2C {
			h = h2c.NewHandler(h, &http2.Server{})
		}
		s.s.Handler = h
	})
}