10 lines
247 B
JavaScript
10 lines
247 B
JavaScript
const dotenv = require('dotenv');
|
|
const path = require('path');
|
|
|
|
module.exports = function (environment = 'development') {
|
|
const envFileName = `.env.${environment}`;
|
|
dotenv.config({
|
|
path: path.resolve(process.cwd(), envFileName),
|
|
});
|
|
};
|