You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
626 B
23 lines
626 B
<?php
|
|
|
|
use Dotenv\Dotenv;
|
|
use Shared\Log;
|
|
|
|
$dotenv = Dotenv::createUnsafeImmutable(__DIR__,'.env');
|
|
$dotenv->safeLoad();
|
|
// apenrently getEnv is not a good thing cause
|
|
// const DB_HOST = $_ENV['DB_HOST'] ?? 'localhost';
|
|
// const DB_DATABASE = $_ENV['DB_DATABASE'] ?? 'heartTrack';
|
|
// const DB_USER = $_ENV['DB_USER'] ?? 'toto';
|
|
// const DB_PASSWORD = $_ENV['DB_PASSWORD'] ?? 'achanger';
|
|
|
|
define("APP_ENV", getenv('APP_ENV'));
|
|
|
|
const DB_HOST = 'mysql';
|
|
const DB_DATABASE = 'test';
|
|
const DB_USER = 'user';
|
|
const DB_PASSWORD = 'pass';
|
|
//const APP_ENV = 'console';
|
|
|
|
const DSN = "mysql:host=" . DB_HOST . ";dbname=" . DB_DATABASE;
|