journey/server/config/site.mjs
Linus Miller ed79c5b7a6 convert server files to esm
- update deps
- remove midwest-service-errors
2020-09-06 19:49:49 +02:00

48 lines
908 B
JavaScript

import _ from 'lodash'
import env from './env.mjs'
import port from './port.mjs'
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',
},
}
export default _.merge(
defaults,
{
development: {
hostname: 'localhost',
port: process.env.EXTERNAL_PORT || process.env.PORT || port,
},
testing: {
hostname: 'localhost',
port: process.env.PORT || port,
},
staging: {
hostname: `admin.${domain}`,
},
production: {
hostname: `admin.${domain}`,
protocol: 'https',
},
}[env.NODE_ENV],
)