A small Slim application for returning a list of pages in a MediaWiki category, ordered by Dale-Chall readability scores.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
705 B

  1. <?php
  2. if (PHP_SAPI == 'cli-server') {
  3. // To help the built-in PHP dev server, check if the request was actually for
  4. // something which should probably be served as a static file
  5. $url = parse_url($_SERVER['REQUEST_URI']);
  6. $file = __DIR__ . $url['path'];
  7. if (is_file($file)) {
  8. return false;
  9. }
  10. }
  11. require __DIR__ . '/../vendor/autoload.php';
  12. session_start();
  13. // Instantiate the app
  14. $settings = require __DIR__ . '/../src/settings.php';
  15. $app = new \Slim\App( $settings );
  16. // Set up dependencies, register middleware, register routes:
  17. require __DIR__ . '/../src/dependencies.php';
  18. require __DIR__ . '/../src/middleware.php';
  19. require __DIR__ . '/../src/routes.php';
  20. // Run app
  21. $app->run();