generated from JBZoo/Skeleton-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjbzoo-mock-server
40 lines (32 loc) · 1.06 KB
/
jbzoo-mock-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env php
<?php
/**
* JBZoo Toolbox - Mock-Server
*
* This file is part of the JBZoo Toolbox project.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Mock-Server
* @license MIT
* @copyright Copyright (C) JBZoo.com, All rights reserved.
* @link https://github.com/JBZoo/Mock-Server
*/
declare(strict_types=1);
use Amp\Http\Server\HttpServer;
use Amp\Http\Server\Server;
use JBZoo\MockServer\StartCommand;
use Symfony\Component\Console\Application;
umask(0000);
date_default_timezone_set('UTC');
require __DIR__ . '/src/functions.php';
require __DIR__ . '/vendor/autoload.php';
if (!class_exists(Server::class)) {
\class_alias(HttpServer::class, Server::class);
}
#define('MOCK_SERVER_IN_DOCKER', Env::bool('MOCK_SERVER_IN_DOCKER'));
#putenv('AMP_LOOP_DRIVER=' . NativeDriver::class);
$application = new Application('JBZoo/Mock-Server', '@git-version@');
$application->add(new StartCommand());
$application->setDefaultCommand('start');
$application->run();