// New inicialize a new server with configuration.
New inicialize a new server with configuration.
// New inicialize a new server with configuration .
func New(port string) (*Server, error) {
	r := chi.NewRouter()
	r.Use(middleware.Logger)
	r.Use(middleware.Recoverer)
	r.Mount("/api/v1", v1.New())
	serv := &http.Server{
		Addr:         ":" + port,
		Handler:      r,
		ReadTimeout:  10 * time.Second,
		WriteTimeout: 10 * time.Second,
	}
	server := Server{server: serv}
	return &server, nil
}
func New ( port string ) ( * Server , error ) { r := chi . NewRouter ( ) r . Use ( middleware . Logger ) r . Use ( middleware . Recoverer ) r . Mount ( " " , v1 . New ( ) ) serv := & http . Server { Addr : " " + port , Handler : r , ReadTimeout : 10 * time . Second , WriteTimeout : 10 * time . Second , } server := Server { server : serv } return & server , nil }
New inicialize a new server with configuration.
New inicialize a new server with configuration .