'use strict' const _ = require('lodash') const env = require('./env') const domain = 'journey.bitmill.io' const defaults = { domain, title: 'Journey', name: 'journey', protocol: 'http', get host() { return this.port ? this.hostname + ':' + this.port : this.hostname }, get url() { return this.protocol + '://' + this.host + '/' }, emails: { robot: 'no-reply@bitmill.io', info: 'info@bitmill.io', webmaster: 'webmaster@tbitmill.io', }, } module.exports = _.merge( defaults, { development: { hostname: 'localhost', port: process.env.EXTERNAL_PORT || process.env.PORT || require('./port'), }, testing: { hostname: 'localhost', port: process.env.PORT || require('./port'), }, staging: { hostname: `admin.${domain}`, }, production: { hostname: `admin.${domain}`, protocol: 'https', }, }[env.NODE_ENV], )