#!/usr/bin/php
<?php

declare(strict_types=1);

require 'src/before_main.php';
\tts\site_helper::set_all_projects(['mockup','ex','live']);
\tts\site_helper::set_default_project("mockup");

$PHPUNIT_Testing = true;

$cli_args = \tts\site_helper::get_cli_args();
\tts\site_helper::init(PROJECT_BASE_DIR, $cli_args, "get", $PHPUNIT_Testing);

require 'src/main.php';

if (\tts\console_app::is_cli() === false) {
    echo 'Unable to Start';
    exit;
}

echo 'Starting...' . PHP_EOL;

$found_route = \tts\router::execute();

if (!$found_route) {
    $app = new \tts\app();
    $app->load_controller();
}