mirror of
https://github.com/Permissionless-Software-Foundation/bch-email-api.git
synced 2026-09-21 16:52:04 -07:00
17 lines
449 B
JavaScript
17 lines
449 B
JavaScript
// Attempt to include a common.js config file, if it exists.
|
|
let common
|
|
try {
|
|
common = require('./env/common')
|
|
} catch (err) {
|
|
common = require('./env/min-config')
|
|
}
|
|
|
|
// Default to development environment.
|
|
const env = process.env.APP_ENV || 'development'
|
|
|
|
// Load the config object for the selected environment.
|
|
const config = require(`./env/${env}`)
|
|
|
|
// Merge into a single object and export.
|
|
module.exports = Object.assign({}, common, config)
|