<?php include_once 'common/rest-app.php'; require 'api/routes.php'; require 'client/routes.php'; $app = new RestApp(); $app->addHandler($api); $app->addHandler($client); $app->run();
<?php include_once 'common/rest-app.php'; $client = new RestApp(); function getIndexPage() { include 'public/index.html'; } $client->route('GET', '/', 'getIndexPage'); function getBundle() { include 'public/js/bundle.js'; } $client->route('GET', '/js/bundle.js', 'getBundle');