Initial backend folder structure and setup
This commit is contained in:
9
routes/api.php
Normal file
9
routes/api.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../app/Config/database.php';
|
||||
require_once __DIR__ . '/../app\Controllers\ProjectController.php';
|
||||
|
||||
$db = (new Database())->getConnection();
|
||||
$controller = new ProjectController($db);
|
||||
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode($controller->getAllProjects());
|
Reference in New Issue
Block a user