We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f40f4aa commit d4f35dfCopy full SHA for d4f35df
public/index.php
@@ -14,10 +14,13 @@
14
use Framework\MVC\App;
15
use Framework\Routing\RouteCollection;
16
17
+define('ENVIRONMENT', $_SERVER['ENVIRONMENT'] ?? 'production');
18
+define('IS_DEV', ENVIRONMENT === 'development');
19
+
20
$app = new App([
21
'exceptionHandler' => [
22
'default' => [
- 'environment' => $_SERVER['ENVIRONMENT'] ?? ExceptionHandler::PRODUCTION,
23
+ 'environment' => ENVIRONMENT,
24
'initialize' => true,
25
'logger_instance' => 'default',
26
],
@@ -28,7 +31,7 @@
28
31
'level' => LogLevel::ERROR,
29
32
30
33
-]);
34
+], IS_DEV);
35
App::router()->serve(null, static function (RouteCollection $routes) : void {
36
$routes->get('/', static function () : array {
37
return [
0 commit comments