<?php
require_once __DIR__.'/config.php';
header('Content-Type: text/plain; charset=utf-8');

echo "GOOGLE_APPLICATION_CREDENTIALS=" . (getenv('GOOGLE_APPLICATION_CREDENTIALS') ?: 'NOT SET') . PHP_EOL;
$path = getenv('GOOGLE_APPLICATION_CREDENTIALS');
if ($path && is_file($path)) {
  $j = json_decode(file_get_contents($path), true);
  echo "JSON project_id=" . ($j['project_id'] ?? 'MISSING') . PHP_EOL;
} else {
  echo "Key file not found or unreadable" . PHP_EOL;
}
echo "GOOGLE_CLOUD_PROJECT=" . (getenv('GOOGLE_CLOUD_PROJECT') ?: 'NOT SET') . PHP_EOL;
