#!/usr/bin/env php
<?php

/*
 * This file is part of the React Symfony Server package.
 *
 * Copyright (c) >=2019 Marc Morera
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * Feel free to edit as you please, and have fun.
 *
 * @author Marc Morera <yuhu@mmoreram.com>
 */

date_default_timezone_set('UTC');

$bootstrapPath = require(dirname(__DIR__) . '/src/bootstrap.php');

$application = new \Symfony\Component\Console\Application();
$application->add(new \Drift\Server\Console\RunServerCommand($bootstrapPath, 'run'));
if (class_exists(\seregazhuk\PhpWatcher\Watcher::class)) {
    $application->add(new \Drift\Server\Console\WatchServerCommand($bootstrapPath, $argv, 'watch'));
}
$application->run();