fipamo/index.php

22 lines
659 B
PHP
Raw Normal View History

2021-03-01 02:04:54 +01:00
<?php
require __DIR__ . "/vendor/autoload.php";
2021-03-01 02:04:54 +01:00
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use Slim\Views\Twig;
use Slim\Views\TwigMiddleware;
include "brain/controller/RouteControl.inc.php";
include "brain/data/Auth.inc.php";
2021-03-01 02:04:54 +01:00
$app = AppFactory::create();
$twig = Twig::create("brain/views/");
2021-03-01 02:04:54 +01:00
$app->add(TwigMiddleware::create($app, $twig));
session_start();
//set up routing
$app->get("/[{first}[/{second}[/{third}[/{fourth}]]]]", "\RouteControl:get");
$app->post("/[{first}[/{second}[/{third}[/{fourt}]]]]", "\RouteControl:post");
//start the app
$app->run();