my-portfolio/dist/api/index.php

24 lines
625 B
PHP
Raw Normal View History

2021-08-22 10:44:49 +01:00
<?php
////////////////// Index file //////////////
/// Creates base routes and runs ///
/// respective functions ///
////////////////////////////////////////////
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
require "routes.php";
require "./vendor/autoload.php";
// Start slim
$app = AppFactory::create();
// create middleware
$app->addRoutingMiddleware();
$errorMiddleware = $app->addErrorMiddleware(false, true, true);
$app->get("/getTimelineData", function (Request $request, Response $response)
{
});