22 lines
508 B
PHP
22 lines
508 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace PhpQml\Bridge\Controller;
|
||
|
|
|
||
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||
|
|
use Symfony\Component\Routing\Attribute\Route;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Readiness probe used by the Qt host to detect when the backend is up.
|
||
|
|
* See PLAN.md §3 (*Startup*, step 4).
|
||
|
|
*/
|
||
|
|
final class HealthController
|
||
|
|
{
|
||
|
|
#[Route('/healthz', name: 'php_qml_bridge_healthz', methods: ['GET'])]
|
||
|
|
public function __invoke(): JsonResponse
|
||
|
|
{
|
||
|
|
return new JsonResponse(['status' => 'ok']);
|
||
|
|
}
|
||
|
|
}
|