th: 12-factor ~~authentication~~ apps were a mistake

lolsob-rspec
kouhai dev 2023-05-22 00:11:41 -07:00
parent a2e6a7d963
commit 93de89e597
1 changed files with 12 additions and 2 deletions

View File

@ -13,10 +13,20 @@ const fs = require('fs');
const WebSocket = require('ws');
const { JSDOM } = require('jsdom');
const environment = process.env.NODE_ENV || 'development';
const environment = process.env.NODE_ENV !== 'development' ? 'production' : 'development';
// Replicate dotenv-rails's behavior
dotenv.config({
path: environment === 'production' ? '.env.production' : '.env',
path: '.env',
});
dotenv.config({
path: environment === 'production' ? '.env.production' : '.env.development',
});
dotenv.config({
path: '.env.local',
});
dotenv.config({
path: environment === 'production' ? '.env.production.local' : '.env.development.local',
});
log.level = process.env.LOG_LEVEL || 'verbose';