Arsse/arsse.php

20 lines
533 B
PHP
Raw Normal View History

<?php
namespace JKingWeb\Arsse;
2017-08-29 10:50:31 -04:00
require_once __DIR__.DIRECTORY_SEPARATOR."bootstrap.php";
2017-08-29 10:50:31 -04:00
if (\PHP_SAPI=="cli") {
// initialize the CLI; this automatically handles --help and --version
$cli = new CLI;
// handle other CLI requests; some do not require configuration
$cli->dispatch();
} else {
// load configuration
Arsse::load(new Conf());
2017-08-29 10:50:31 -04:00
if (file_exists(BASE."config.php")) {
Arsse::$conf->importFile(BASE."config.php");
}
// handle Web requests
(new REST)->dispatch()->output();
2017-08-29 10:50:31 -04:00
}