diff --git a/index.php b/index.php index d7bc7e3..681444f 100644 --- a/index.php +++ b/index.php @@ -1,94 +1,54 @@ - - -
- - - - +Dinner in the Woods 2019 - Tickets on sale March 15th! +use Bramus\Router\Router; - - +require __DIR__ . '/vendor/autoload.php'; +require __DIR__ . '/src/functions.php'; - - - +// Load environment variables +$dotenv = \Dotenv\Dotenv::create(__DIR__ . '/src'); +$dotenv->load(); +$dotenv->required([ + 'EVENT_TICKET_PRICE', + 'ENHANCER_TICKET_PRICE', + 'DB_HOST', + 'DB_USER', + 'DB_PASS', + 'POSTMARK_API_KEY', +]); - - - +$router = new Router(); - +// Custom 404 Handler +$router->set404(function () { + header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); + echo '404, route not found!'; +}); -
-