-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (17 loc) · 676 Bytes
/
index.php
File metadata and controls
26 lines (17 loc) · 676 Bytes
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
<?php declare(strict_types=1);
require_once 'core/Application.php';
require_once 'core/DatabaseBootstrap.php';
require_once 'core/utils/DotEnvParser.php';
use core\util\DotEnvParser;
DotEnvParser::parse(__DIR__ . DIRECTORY_SEPARATOR . '.env');
$dbConfig = [
'dsn' => "mysql:host={$_ENV["DATABASE_HOST"]};post={$_ENV["DATABASE_PORT"]};dbname={$_ENV["DATABASE_NAME"]}",
'user' => "{$_ENV["DATABASE_USER"]}",
'password' => "{$_ENV["DATABASE_PASSWORD"]}",
];
DatabaseBootstrap::bootstrap();
global $app;
$app = Application::init($_ENV['APPLICATION_NAME'], $dbConfig);
require_once('core/front_routes.php');
require_once('core/api_routes.php');
$app->start();