christmas/config/index.js
Wingy f3cfc6abe0 Remove CDN usage
Cache Partitioning is now a thing in browsers.
This negates the advantage of a CDN.
2020-12-01 21:39:11 -05:00

19 lines
913 B
JavaScript

require('dotenv').config()
const yesNo = require('yes-no')
module.exports = {
dbPrefix: process.env.DB_PREFIX || 'dbs/',
defaultFailureRedirect: process.env.DEFAULT_FAILURE_REDIRECT || '/login',
port: Number(process.env.PORT) || 3000,
dbExposePort: Number(process.env.DB_EXPOSE_PORT) || null,
proxyServer: process.env.PROXY_SERVER || undefined,
secret: process.env.SECRET || require('./secret'),
sessionMaxAge: Number(process.env.SESSION_MAX_AGE) || 1000 * 60 * 60 * 24 * 7,
siteTitle: process.env.SITE_TITLE || 'Christmas Community',
shortTitle: process.env.SHORT_TITLE || 'Christmas',
wishlist: require('./wishlist'),
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',
markdown: yesNo.parse(process.env.MARKDOWN || false)
}