@accelerated-software-development/caddy-api-client - v0.4.3
    Preparing search index...

    Function detectAdapter

    • Detect the appropriate adapter based on file extension

      Parameters

      • path: string

        Path to the configuration file

      Returns CaddyAdapter

      The detected adapter type

      detectAdapter("./config.json");     // "json"
      detectAdapter("./config.yaml"); // "yaml"
      detectAdapter("./Caddyfile"); // "caddyfile"
      detectAdapter("./unknown.txt"); // "caddyfile" (default)