forked from nova-framework/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge
executable file
·51 lines (33 loc) · 1.64 KB
/
forge
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
#!/usr/bin/env php
<?php
//--------------------------------------------------------------------------
// Define The Application Paths
//--------------------------------------------------------------------------
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
/** Define the absolute paths for configured directories. */
define('BASEPATH', realpath(__DIR__) .DS);
define('APPPATH', BASEPATH .'app' .DS);
define('WEBPATH', BASEPATH .'public' .DS);
//--------------------------------------------------------------------------
// Register The Auto Loader
//--------------------------------------------------------------------------
require BASEPATH .'vendor' .DS .'autoload.php';
//--------------------------------------------------------------------------
// Turn On The Lights
//--------------------------------------------------------------------------
$app = require_once APPPATH .'Boot' .DS .'Start.php';
//--------------------------------------------------------------------------
// Load The Forge Console Application
//--------------------------------------------------------------------------
use Nova\Console\Application as ConsoleApplication;
$app->setRequestForConsoleEnvironment();
$forge = ConsoleApplication::start($app);
//--------------------------------------------------------------------------
// Run The Forge Application
//--------------------------------------------------------------------------
$status = $forge->run();
//--------------------------------------------------------------------------
// Shutdown The Application
//--------------------------------------------------------------------------
$app->shutdown();
exit($status);