Mise à jour des .env

This commit is contained in:
Rampeur
2025-08-15 23:24:41 +02:00
parent f211bc4b5b
commit 10013e1de8
6 changed files with 44 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
const dotenv = require('dotenv');
dotenv.config();
// configuration for the database connection based on the environment (development, test, production)
module.exports = {
development: {
use_env_variable: 'MYSQL_DATABASE_URL_DEV',
},
test: {
use_env_variable: 'MYSQL_DATABASE_URL_DEV',
dialect: "mysql",
dialectOptions: {
ssl: process.env.NODE_ENV === 'production', // set this value based on your environment
},
},
production: {
use_env_variable: 'MYSQL_DATABASE_URL',
dialectOptions: {
ssl: {
// enable this for production environment only if using a secure connection
require: true,
rejectUnauthorized: false,
},
},
},
};