generovane subory apilite,

fix globalnych $_SERVER v konfiguracii
This commit is contained in:
2026-02-09 07:48:07 +01:00
parent d9a283cfdf
commit e59bfc26a0
8 changed files with 46 additions and 9 deletions

View File

@ -0,0 +1,19 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
ob_start();
$backend_api = new TPsoft\BugreportBackend\API('typescript', 'import.meta.env.VITE_BACKENDAPI_URL', 'backend');
$output = ob_get_contents();
ob_end_clean();
$ts_path = realpath(__DIR__ . '/../../frontend/src').'/backend.js';
$suc = file_put_contents($ts_path, $output);
if ($suc === false) {
echo "✗ TypeScript store into file failed\n";
exit(2);
}
echo "✓ TypeScript backend script created\n";