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.
Web/Sources/config/config.php

22 lines
607 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", 'development');
const DB_HOST = 'localhost';
const DB_DATABASE = 'heartTrack';
const DB_USER = 'toto';
const DB_PASSWORD = 'achanger';
const DSN = "mysql:host=" . DB_HOST . ";dbname=" . DB_DATABASE;