@jambonz/sdk
    Preparing search index...

    Function envVarsMiddleware

    • Express middleware that auto-responds to HTTP OPTIONS requests with the application's environment variable schema, enabling jambonz portal discovery.

      Parameters

      • schema: EnvVarSchema

        The environment variable schema to expose.

      Returns (
          req: { method: string },
          res: { json: (body: unknown) => void },
          next: () => void,
      ) => void

      import { envVarsMiddleware } from '@jambonz/sdk/webhook';

      const envVars = {
      API_KEY: { type: 'string', description: 'Your API key', required: true },
      };
      app.use(envVarsMiddleware(envVars));