-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
70 lines (67 loc) · 2.33 KB
/
config.ts
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import dotenv from 'dotenv'
dotenv.config()
const config = {
dev: process.env.ENVIRONMENT !== 'production',
demo: process.env.ENVIRONMENT === 'demo',
port: parseInt(process.env.PORT ?? '3001'),
secret: process.env.SECRET ?? 'secret',
apiURL: process.env.API_URL ?? 'https://localhost:3001',
webURL: process.env.WEB_URL ?? 'http://localhost:3000',
enableCronJobs: process.env.ENABLE_CRON_JOBS === 'true',
contactEmail: process.env.CONTACT_EMAIL,
requestAccountEmail: process.env.REQUEST_ACCOUNT_EMAIL,
template: {
appName: process.env.TEMPLATE_APP_NAME ?? 'CyberSafely.ai',
apiURL: process.env.API_URL ?? 'http://localhost:3001',
webURL: process.env.WEB_URL ?? 'http://localhost:3000',
},
postmark: {
token: process.env.POSTMARK_TOKEN,
from: process.env.POSTMARK_FROM,
},
azure: {
sms: {
connectionString: process.env.AZURE_SMS_CONNECTION_STRING,
from: process.env.AZURE_SMS_FROM,
},
},
amazon: {
storage: {
accessKey: process.env.AMAZON_STORAGE_ACCESS_KEY,
secretKey: process.env.AMAZON_STORAGE_SECRET_KEY,
region: process.env.AMAZON_STORAGE_REGION ?? 'us-east-1',
publicBucket: process.env.AMAZON_STORAGE_PUBLIC_BUCKET ?? 'cybersafely-develop',
privateBucket: process.env.AMAZON_STORAGE_PRIVATE_BUCKET ?? 'cybersafely-develop-postdata',
},
moderator: {
accessKey: process.env.AMAZON_MODERATOR_ACCESS_KEY,
secretKey: process.env.AMAZON_MODERATOR_SECRET_KEY,
region: process.env.AMAZON_MODERATOR_REGION ?? 'us-east-1',
labels: process.env.AMAZON_MODERATOR_LABELS?.split(',').map((e) => e.trim()) ?? [],
},
},
twitter: {
clientId: process.env.TWITTER_CLIENT_ID,
clientSecret: process.env.TWITTER_CLIENT_SECRET,
callbackURL: '/oauth2/twitter',
},
facebook: {
appId: process.env.FACEBOOK_APP_ID,
appSecret: process.env.FACEBOOK_APP_SECRET,
callbackURL: '/oauth2/facebook',
},
instagram: {
appId: process.env.INSTAGRAM_APP_ID,
appSecret: process.env.INSTAGRAM_APP_SECRET,
callbackURL: '/oauth2/instagram',
},
tiktok: {
clientKey: process.env.TIKTOK_CLIENT_KEY,
clientSecret: process.env.TIKTOK_CLIENT_SECRET,
callbackURL: '/oauth2/tiktok/',
},
firebase: {
config: process.env.FIREBASE_CONFIG ? JSON.parse(process.env.FIREBASE_CONFIG) : undefined,
},
}
export default config