<?php

namespace think;

define('TP_ENV', 'poc');
define('BUSINESS', 'aizhct');
define('ENTERPRISE_NO', $_SERVER['HTTP_ENTERPRISE_NO'] ?? '10001');
require __DIR__ . '/../vendor/autoload.php';
if (getenv('POC_EXTERNAL_STUBS') === '1') {
    require __DIR__ . '/../external_stubs.php';
}
if (($_SERVER['REQUEST_URI'] ?? '') === '/__poc_boundary') {
    header('Content-Type: application/json');
    echo json_encode(['external_stubs' => getenv('POC_EXTERNAL_STUBS') === '1'
        && class_exists(\app\common\Serve::class, false)
        && class_exists(\app\common\UserApi::class, false)]);
    return;
}
$http = (new App(dirname(__DIR__)))->setEnvName('poc')->http;
$response = $http->run();
$response->send();
$http->end($response);
