forked from AliasIO/Swiftlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
29 lines (20 loc) · 570 Bytes
/
index.php
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
<?php
namespace Swiftlet;
try {
chdir(dirname(__FILE__));
// Bootstrap the application
require 'Swiftlet/Interfaces/App.php';
require 'Swiftlet/App.php';
$app = new App;
set_error_handler(array($app, 'error'), E_ALL | E_STRICT);
spl_autoload_register(array($app, 'autoload'));
require 'config.php';
$app->run();
$app->serve();
} catch ( \Exception $e ) {
if ( !headers_sent() ) {
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
}
exit('Swiftlet Exception: ' . $e->getMessage());
}