-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
43 lines (41 loc) · 1.55 KB
/
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
37
38
39
40
41
42
43
require('dotenv').config({ path: process.env.NODE_ENV === 'production' ? './.env' : './.env.dev' })
const { strictEqual } = require('assert')
strictEqual(typeof process.env.HASH_SECRET, 'string', 'You need hash secret!')
strictEqual(typeof process.env.TWILIO_FROM, 'string', 'You need Twilio from!')
strictEqual(typeof process.env.TWILIO_SID, 'string', 'You need TWILIO_SID!')
strictEqual(typeof process.env.TWILIO_AUTH_TOKEN, 'string', 'You need TWILIO_AUTH_TOKEN!')
strictEqual(typeof process.env.MAILGUN_FROM, 'string', 'You need MAILGUN_FROM!')
strictEqual(typeof process.env.MAILGUN_DOMAIN, 'string', 'You need MAILGUN_DOMAIN!')
strictEqual(typeof process.env.MAILGUN_KEY, 'string', 'You need MAILGUN_KEY!')
export default {
port: 3001,
company: 'Talaikis Ltd.',
hashingSecret: process.env.HASH_SECRET,
logging: true,
mobileProvider: 'twilio',
emailProvider: 'mailgun',
twilio: {
from: process.env.TWILIO_FROM,
sid: process.env.TWILIO_SID,
authToken: process.env.TWILIO_AUTH_TOKEN
},
mailgun: {
nameFrom: process.env.MAILGUN_FROM,
domainName: process.env.MAILGUN_DOMAIN,
apiKey: process.env.MAILGUN_KEY
},
workers: { // in seconds
tokenClean: 60 * 60,
logRotate: 60 * 60 * 24,
unconfirmedClean: 60 * 60 * 3
},
tokenExpiry: 60 * 60,
mainConfirm: 'email',
baseUrl: 'https://ufunc.com/'
}
export const FACEBOOK_CLIENT_ID = ''
export const FACEBOOK_CLIENT_SECRET = ''
export const TWITTER_CONSUMER_KEY = ''
export const TWITTER_CONSUMER_SECRET = ''
export const GOOGLE_CLIENT_ID = ''
export const GOOGLE_CLIENT_SECRET = ''