-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathengineer
98 lines (85 loc) · 2.64 KB
/
engineer
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
require __DIR__.'/vendor/autoload.php';
use Dotenv\Dotenv;
use Symfony\Component\Console\Application;
use Fomo\Commands\Server\Start as StartServerCommand;
use Fomo\Commands\Server\Reload as ReloadServerCommand;
use Fomo\Commands\Server\Status as StatusServerCommand;
use Fomo\Commands\Server\Stop as StopServerCommand;
use Fomo\Commands\Build\Controller as BuildControllerCommand;
use Fomo\Commands\Build\Exception as BuildExceptionCommand;
use Fomo\Commands\Build\Middleware as BuildMiddlewareCommand;
use Fomo\Commands\Build\Resource as BuildResourceCommand;
use Fomo\Commands\Build\Test as BuildTestCommand;
use Fomo\Commands\Build\Job as BuildJobCommand;
use Fomo\Commands\Build\Task as BuildTaskCommand;
use Fomo\Commands\Build\Service as BuildServiceCommand;
use Fomo\Commands\Tests\Run as TestsRunCommand;
use Fomo\Commands\Factory\Start as FactoryStartCommand;
use Fomo\Commands\Queue\Start as QueueStartCommand;
use Fomo\Commands\Queue\Status as QueueStatusCommand;
use Fomo\Commands\Queue\Stop as QueueStopCommand;
use Fomo\Commands\Scheduling\Start as SchedulerStartCommand;
use Fomo\Commands\Scheduling\Status as SchedulerStatusCommand;
use Fomo\Commands\Scheduling\Stop as SchedulerStopCommand;
/*
* create const's and definitions
*/
define('PROJECT_PATH' , realpath('./'));
const FOMO_VERSION = '2.4.3';
const ENABLE = true;
const DISABLE = false;
/*
* load .env file
*/
Dotenv::createImmutable(basePath())->load();
/*
* set timezone
*/
date_default_timezone_set(config('app.timezone'));
/*
* create console
*/
$application = new Application();
/*
* server commands
*/
$application->add(new StartServerCommand());
$application->add(new ReloadServerCommand());
$application->add(new StatusServerCommand());
$application->add(new StopServerCommand());
/*
* build commands
*/
$application->add(new BuildControllerCommand());
$application->add(new BuildExceptionCommand());
$application->add(new BuildMiddlewareCommand());
$application->add(new BuildResourceCommand());
$application->add(new BuildTestCommand());
$application->add(new BuildJobCommand());
$application->add(new BuildTaskCommand());
$application->add(new BuildServiceCommand());
/*
* tests commands
*/
$application->add(new TestsRunCommand());
/*
* factory commands
*/
$application->add(new FactoryStartCommand());
/*
* queue commands
*/
$application->add(new QueueStartCommand());
$application->add(new QueueStatusCommand());
$application->add(new QueueStopCommand());
/*
* scheduler commands
*/
$application->add(new SchedulerStartCommand());
$application->add(new SchedulerStatusCommand());
$application->add(new SchedulerStopCommand());
/*
* run console
*/
$application->run();