2018-11-20 11:19:58 -08:00
|
|
|
require('dotenv').config();
|
2018-11-26 13:18:28 -08:00
|
|
|
|
|
|
|
const yesNo = require('yes-no');
|
|
|
|
|
2018-11-20 11:19:58 -08:00
|
|
|
module.exports = {
|
|
|
|
dbUrl: process.env.DB_URL || 'db',
|
|
|
|
defaultFailureRedirect: process.env.DEFAULT_FAILURE_REDIRECT || '/login',
|
2018-11-30 13:44:06 -08:00
|
|
|
port: Number(process.env.PORT) || 3000,
|
2018-11-21 11:12:59 -08:00
|
|
|
proxyServer: process.env.PROXY_SERVER || undefined,
|
2018-11-22 15:42:19 -08:00
|
|
|
secret: process.env.SECRET || require('./secret'),
|
2019-08-19 07:49:21 -07:00
|
|
|
sessionStore: process.env.SESSION_STORE || './sessions',
|
2018-11-22 16:07:42 -08:00
|
|
|
sessionMaxAge: Number(process.env.SESSION_MAX_AGE) || 1000 * 60 * 60 * 24 * 7,
|
2018-11-26 13:18:28 -08:00
|
|
|
siteTitle: process.env.SITE_TITLE || 'Christmas Community',
|
2019-11-17 12:46:08 -08:00
|
|
|
shortTitle: process.env.SHORT_TITLE || 'Christmas',
|
2018-11-30 13:44:06 -08:00
|
|
|
useCDN: yesNo.parse(process.env.USE_CDN || true),
|
2020-10-29 11:14:38 -07:00
|
|
|
wishlist: require('./wishlist'),
|
2020-11-02 14:22:07 -08:00
|
|
|
base: (process.env.ROOT_PATH || '/').endsWith('/') ? (process.env.ROOT_PATH || '/') : `${process.env.ROOT_PATH}/`,
|
|
|
|
trustProxy: process.env.TRUST_PROXY === 'true' ? true : process.env.TRUST_PROXY || 'loopback'
|
2018-11-20 11:19:58 -08:00
|
|
|
};
|