pridana implementacia backend s composerom a kniznicami TPsoft/APIlite a TPsoft/DBmodel

This commit is contained in:
2025-10-01 00:57:41 +02:00
parent 8184ffb46d
commit 1cf79a20b3
45 changed files with 907 additions and 58 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');
$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";

View File

@ -0,0 +1,9 @@
<?php
require_once __DIR__ . '/../src/Init.php';
use \TPsoft\DBmodel\Creator;
global $dbh;
$creator = new Creator($dbh);
$creator->rootDir(realpath(__DIR__.'/../src/'));
$creator->interact();