@eloritzkovitz/server-essentials
    Preparing search index...

    Function registerProxyRoutes

    • Registers proxy routes for microservices in the API gateway. Accepts a config array for flexibility and reusability.

      Parameters

      • app: Application

        The Express application instance.

      • proxy: Server

        The http-proxy instance.

      • routes: { apiPath: string; rewritePrefix: string; serviceName: string; target: string }[]

        Array of route configs: { apiPath, target, rewritePrefix, serviceName }

      Returns void