forked from tuupola/slim-api-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.php
43 lines (34 loc) · 922 Bytes
/
app.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
* This file is part of the Slim API skeleton package
*
* Copyright (c) 2016-2017 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* https://github.com/tuupola/slim-api-skeleton
*
*/
date_default_timezone_set("UTC");
error_reporting(E_ALL);
ini_set("display_errors", 1);
require __DIR__ . "/vendor/autoload.php";
$dotenv = new Dotenv\Dotenv(__DIR__);
$dotenv->load();
$app = new \Slim\App([
"settings" => [
"displayErrorDetails" => true,
"addContentLengthHeader" => false,
]
]);
require __DIR__ . "/config/dependencies.php";
require __DIR__ . "/config/handlers.php";
require __DIR__ . "/config/middleware.php";
$app->get("/", function ($request, $response, $arguments) {
print "Here be dragons";
});
require __DIR__ . "/routes/token.php";
require __DIR__ . "/routes/todos.php";
$app->run();