mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 11:10:57 +01:00
21 lines
625 B
PHP
21 lines
625 B
PHP
<?php
|
|
|
|
if (!isset($config)) {
|
|
die("No configuration object provided.");
|
|
}
|
|
|
|
if (!is_writable(__DIR__ . DIRECTORY_SEPARATOR . 'cache')) {
|
|
die(sprintf('The "%s" folder must be writable for GitList to run.', __DIR__ . DIRECTORY_SEPARATOR . 'cache'));
|
|
}
|
|
|
|
// Startup and configure Silex application
|
|
$app = new GitList\Application($config, __DIR__);
|
|
|
|
// Mount the controllers
|
|
$app->mount('', new GitList\Controller\MainController());
|
|
$app->mount('', new GitList\Controller\BlobController());
|
|
$app->mount('', new GitList\Controller\CommitController());
|
|
$app->mount('', new GitList\Controller\TreeController());
|
|
|
|
return $app;
|