1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+// Load configuration |
|
4 |
+$config = new GitList\Config('config.ini'); |
|
5 |
+$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR); |
|
6 |
+ |
|
7 |
+// Startup and configure Silex application |
|
8 |
+$app = new GitList\Application($config, __DIR__); |
|
9 |
+ |
|
10 |
+// Mount the controllers |
|
11 |
+$app->mount('', new GitList\Controller\MainController()); |
|
12 |
+$app->mount('', new GitList\Controller\BlobController()); |
|
13 |
+$app->mount('', new GitList\Controller\CommitController()); |
|
14 |
+$app->mount('', new GitList\Controller\TreeController()); |
|
15 |
+ |
|
16 |
+return $app; |
|
0 | 17 |
\ No newline at end of file |
... | ... |
@@ -6,18 +6,5 @@ |
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
require 'vendor/autoload.php'; |
9 |
- |
|
10 |
-// Load configuration |
|
11 |
-$config = new GitList\Config('config.ini'); |
|
12 |
-$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR); |
|
13 |
- |
|
14 |
-// Startup and configure Silex application |
|
15 |
-$app = new GitList\Application($config, __DIR__); |
|
16 |
- |
|
17 |
-// Mount the controllers |
|
18 |
-$app->mount('', new GitList\Controller\MainController()); |
|
19 |
-$app->mount('', new GitList\Controller\BlobController()); |
|
20 |
-$app->mount('', new GitList\Controller\CommitController()); |
|
21 |
-$app->mount('', new GitList\Controller\TreeController()); |
|
22 |
- |
|
23 |
-$app->run(); |
|
9 |
+$app = require 'boot.php'; |
|
10 |
+$app->run(); |
|
24 | 11 |
\ No newline at end of file |