This commit is contained in:
19
config/db.php
Normal file
19
config/db.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
$pdo = null;
|
||||
|
||||
if (!defined('APP_ENV')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$dbLoader = __DIR__ . '/' . APP_ENV . '/db.php';
|
||||
|
||||
// The prototype should run without a database. Explicit opt-in keeps the
|
||||
// current concept environment usable while the data layer is still evolving.
|
||||
$enableDb = getenv('APP_ENABLE_DB') === '1';
|
||||
|
||||
if ($enableDb && is_file($dbLoader)) {
|
||||
require_once $dbLoader;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user