You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

54 lines
1.1 KiB

const path = require('path')
const CFG = {}
const CFG_DB_NAME = 'earth'
CFG.media = {
cache: path.resolve('/data/nubium-artifex/cache'),
documents: path.resolve('/data/nubium-artifex/documents'),
'404': path.resolve(__dirname, './services/media/rsc/default/404.jpg')
}
// console.log(CFG.media)
CFG.server = {
port: process.env.PORT || 3009
}
CFG.mongo = {
url: `mongodb://localhost:27017/${CFG_DB_NAME}`,
db: CFG_DB_NAME
}
CFG.jwt = {
enable: true,
jwtAuth: {
secret: '@@Earth@@Hello0WorlD!!!!',
passSalt: '@@Earth@@Hello0WorlDForP@55W0RD!!!!',
expiresIn: '15d'
},
jwtAccess: {
secret: '@@Earth@@Hello0WorlD!!!!',
expiresIn: '24h'
},
sid: 1
}
// ////////////////////////////////////////////////////////////////////////////
// UP FROM ENV
if (process.env.ENV === 'dev') {
CFG.mongo.url = 'mongodb://localhost:27017'
CFG.jwt.enable = false
}
if (process.env.ENV === 'prod') {
CFG.mongo.url = 'mongodb://rw:pxcom@airpmp.aero:27017/admin'
}
if (process.env.ENV === 'preprod') {
CFG.mongo.url = 'mongodb://localhost:27017'
}
console.log(CFG.mongo.url)
module.exports = CFG