-
Notifications
You must be signed in to change notification settings - Fork 21
/
config.js
36 lines (33 loc) · 961 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const secrets = require('./secrets')
let SERVER_URL = (process.env.NODE_ENV === 'production') ? 'https://cb.lk' : 'http://localhost:3987'
if (process.env.SHORTLR_URL) {
SERVER_URL = process.env.SHORTLR_URL
}
const config = {
SERVER: {
PORT: process.env.PORT || 3987,
URL: SERVER_URL
},
DB: {
DATABASE: secrets.DB.NAME,
USERNAME: secrets.DB.USERNAME,
PASSWORD: secrets.DB.PASSWORD,
HOST: secrets.DB.HOST,
SYNC_ALTER: process.env.DB_SYNC_ALTER || false,
SYNC_FORCE: process.env.DB_SYNC_FORCE || false
},
SESSION: {
SECRET: secrets.SESSION_SECRET,
DROP_SESSION: process.env.DROP_SESSION || false
},
ONEAUTH: {
CLIENT_ID: secrets.ONEAUTH_CLIENT_ID,
CLIENT_SECRET: secrets.ONEAUTH_CLIENT_SECRET,
CALLBACK_URL: SERVER_URL + '/login/callback'
},
RAVEN: {
DSN: secrets.SENTRY_DSN
}
}
config.COOKIE_DOMAIN = (process.env.NODE_ENV === 'production') ? 'cb.lk' : null
module.exports = config