aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Routes.php7
-rw-r--r--bootstrap/Bootstrap.php14
2 files changed, 7 insertions, 14 deletions
diff --git a/app/Routes.php b/app/Routes.php
index 28bcdc0..40320c7 100644
--- a/app/Routes.php
+++ b/app/Routes.php
@@ -1,7 +1,11 @@
<?php
+
+$router = new Router;
+
/**
* Public routes
*/
+
$router->get('', '../app/controllers/index.controller.php');
$router->get('contact', '../app/controllers/contact.controller.php');
$router->get('resume', '../app/controllers/resume.controller.php');
@@ -17,7 +21,8 @@ $router->post('upload', '../app/controllers/upload.controller.php');
$router->post('contact', '../app/controllers/contact.controller.php');
/**
- * Api routes
+ * API routes
*/
+
$router->post('api/v1/thumbnails', '../app/controllers/api/thumbnails.controller.php');
$router->post('api/v1/cache', '../app/controllers/api/cache.controller.php');
diff --git a/bootstrap/Bootstrap.php b/bootstrap/Bootstrap.php
index 4e10f48..28b4371 100644
--- a/bootstrap/Bootstrap.php
+++ b/bootstrap/Bootstrap.php
@@ -1,25 +1,13 @@
<?php
-/* composer autoload */
require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/vendor/autoload.php';
-
-/* source helper functions */
require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/bootstrap/Helpers.php';
-/* source config file */
$config = include $_SERVER['DOCUMENT_ROOT'] . '/..' . '/config.php';
-/* connect database */
$contact['database'] = new QueryBuilder(Connection::make($config['database']));
-/* create new router */
-$router = new Router;
-
-/* create navigator */
-$navigation = new Navigation();
+$navigation = new Navigation;
-/* create new theme */
$theme = new Theme;
-
-/* enable dark and light themes */
$theme->toggle();