func NewHandler(cfg *Config) (nethttp.Handler, error) {
	r := mux.NewRouter()

	if cfg.ModDir == "" {
		return nil, errors.New("invalid config: ModDir must be provided")
	}

	repo := repository.NewModuleRepository(cfg.ModDir)
	uc := usecase.NewProxyUsecase(repo)
	http.NewProxyHandler(r, uc)

	return r, nil
}
// NewHandler initializes a new http.Handler based on the given server configuration.
NewHandler initializes a new http.Handler based on the given server configuration.
// NewHandler initializes a new http . Handler based on the given server configuration .
func NewHandler(cfg *Config) (nethttp.Handler, error) {
	r := mux.NewRouter()
	if cfg.ModDir == "" {
		return nil, errors.New("invalid config: ModDir must be provided")
	}
	repo := repository.NewModuleRepository(cfg.ModDir)
	uc := usecase.NewProxyUsecase(repo)
	http.NewProxyHandler(r, uc)
	return r, nil
}
func NewHandler ( cfg * Config ) ( nethttp . Handler , error ) { r := mux . NewRouter ( ) if cfg . ModDir == " " { return nil , errors . New ( " " ) } repo := repository . NewModuleRepository ( cfg . ModDir ) uc := usecase . NewProxyUsecase ( repo ) http . NewProxyHandler ( r , uc ) return r , nil }
NewHandler initializes a new http.Handler based on the given server configuration.
NewHandler initializes a new http . Handler based on the given server configuration .