1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
Arsse/arsse.php
J. King cc2296522c More changes in anticipation of a release:
- Don't load a config (and possibly create a database) in CLI if a configuration is not required
- Removed the 'dbSchemaBase' config option, which is really a testing hack
- Added sample Nginx configuration
- Fixed bug in REST handler
- Readme still needs work
2017-08-19 23:56:32 -04:00

18 lines
No EOL
529 B
PHP

<?php
namespace JKingWeb\Arsse;
require_once __DIR__.DIRECTORY_SEPARATOR."bootstrap.php";
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());
if(file_exists(BASE."config.php")) {
Arsse::$conf->importFile(BASE."config.php");
}
// handle Web requests
(new REST)->dispatch()->output();
}