forked from projects/fipamo
git ignore tweak to save index. oops
This commit is contained in:
parent
0ea15ae4b2
commit
f3aa86d472
2 changed files with 24 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ node_modules/
|
||||||
!public/
|
!public/
|
||||||
public/*
|
public/*
|
||||||
!public/favicon.ico
|
!public/favicon.ico
|
||||||
|
!public/index.php
|
||||||
!public/assets
|
!public/assets
|
||||||
public/assets/*
|
public/assets/*
|
||||||
!public/assets/images
|
!public/assets/images
|
||||||
|
|
23
public/index.php
Normal file
23
public/index.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
require "../vendor/autoload.php";
|
||||||
|
|
||||||
|
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";
|
||||||
|
include "../brain/utility/StringTools.inc.php";
|
||||||
|
include "../brain/data/Session.inc.php";
|
||||||
|
|
||||||
|
$app = AppFactory::create();
|
||||||
|
$twig = Twig::create("../brain/views/");
|
||||||
|
$app->add(TwigMiddleware::create($app, $twig));
|
||||||
|
//set up routing
|
||||||
|
$app->get("/[{first}[/{second}[/{third}[/{fourth}]]]]", "\RouteControl:get");
|
||||||
|
$app->post("/[{first}[/{second}[/{third}[/{fourt}]]]]", "\RouteControl:post");
|
||||||
|
//start the app
|
||||||
|
|
||||||
|
$app->run();
|
Loading…
Reference in a new issue