#252 reorganise .env
This commit is contained in:
parent
d28553eddc
commit
5edff7eb59
|
@ -1,3 +1,5 @@
|
||||||
|
require('./src/dotenv')();
|
||||||
|
|
||||||
import { loadSuml } from './server/loader';
|
import { loadSuml } from './server/loader';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import {buildDict, buildList, buildLocaleList} from "./src/helpers";
|
import {buildDict, buildList, buildLocaleList} from "./src/helpers";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
require('dotenv').config({ path:__dirname + '/../.env' });
|
require('../src/dotenv')();
|
||||||
|
|
||||||
const Pageres = require('pageres');
|
const Pageres = require('pageres');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const Suml = require('suml');
|
const Suml = require('suml');
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
require('dotenv').config({ path:__dirname + '/../.env' });
|
require('../src/dotenv')();
|
||||||
|
|
||||||
const Pageres = require('pageres');
|
const Pageres = require('pageres');
|
||||||
const isHighLoadTime = require('./overload');
|
const isHighLoadTime = require('./overload');
|
||||||
const dbConnection = require('./db');
|
const dbConnection = require('./db');
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
require('../src/dotenv')();
|
||||||
|
|
||||||
const dbConnection = require('./db');
|
const dbConnection = require('./db');
|
||||||
require('dotenv').config({ path:__dirname + '/../.env' });
|
|
||||||
const awsConfig = require('./aws');
|
const awsConfig = require('./aws');
|
||||||
const S3 = require('aws-sdk/clients/s3');
|
const S3 = require('aws-sdk/clients/s3');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
require('../src/dotenv')();
|
||||||
|
|
||||||
const dbConnection = require('./db');
|
const dbConnection = require('./db');
|
||||||
require('dotenv').config({ path:__dirname + '/../.env' });
|
|
||||||
const mailer = require('../src/mailer');
|
const mailer = require('../src/mailer');
|
||||||
|
|
||||||
// TODO duplication...
|
// TODO duplication...
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
require('../src/dotenv')();
|
||||||
|
|
||||||
const dbConnection = require('./db');
|
const dbConnection = require('./db');
|
||||||
require('dotenv').config({ path:__dirname + '/../.env' });
|
|
||||||
const {calculateStats, statsFile} = require('../src/stats');
|
const {calculateStats, statsFile} = require('../src/stats');
|
||||||
const locales = require('../src/locales');
|
const locales = require('../src/locales');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
const dotenv = require('dotenv');
|
||||||
|
|
||||||
|
module.exports = () => {
|
||||||
|
dotenv.config({ path:__dirname + '/../.env' });
|
||||||
|
if (process.env.__INCLUDE) {
|
||||||
|
dotenv.config({ path:__dirname + '/../' + process.env.__INCLUDE });
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue