-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathserverlessEnv.js
More file actions
27 lines (25 loc) · 794 Bytes
/
serverlessEnv.js
File metadata and controls
27 lines (25 loc) · 794 Bytes
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
const dotEnv = require('dotenv');
dotEnv.config();
module.exports.config = () => {
const devCustomDomain = process.env.CUSTOM_DOMAIN_DEV;
const prodCustomDomain = process.env.CUSTOM_DOMAIN_PROD;
const alphaCustomDomain = process.env.CUSTOM_DOMAIN_ALPHA;
const fotopiaGroup = process.env.FOTOPIA_GROUP;
const nameSpace = process.env.NAME_SPACE || 'none';
return {
dev: {
CUSTOM_DOMAIN: devCustomDomain || 'none',
USE_CUSTOM_DOMAIN: !!devCustomDomain,
},
prod: {
CUSTOM_DOMAIN: prodCustomDomain || 'none',
USE_CUSTOM_DOMAIN: !!prodCustomDomain,
},
alpha: {
CUSTOM_DOMAIN: alphaCustomDomain || 'none',
USE_CUSTOM_DOMAIN: !!alphaCustomDomain,
},
FOTOPIA_GROUP: fotopiaGroup || 'none',
NAME_SPACE: nameSpace,
};
};