-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
32 lines (27 loc) · 950 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
const PRODUCTION_ROOT = 'https://microfrontends-demo';
const FUNCTIONS_PATH = '.netlify/functions/';
const API_ENDPOINT = `${FUNCTIONS_PATH}api`;
const getProductionUrl = (site = '') => `${PRODUCTION_ROOT}${site}.netlify.app`;
const config = {
production: {
publicPath: `${process.env.URL}/`,
remoteUrls: {
SHELL: getProductionUrl(),
HOME: getProductionUrl('-home'),
SEARCH: getProductionUrl('-search'),
VIEW_ITEM: getProductionUrl('-view-item'),
API: `${getProductionUrl('-api')}/${API_ENDPOINT}`,
}
},
development: {
publicPath: 'auto',
remoteUrls: {
SHELL: 'http://localhost:3000',
HOME: 'http://localhost:3001',
SEARCH: 'http://localhost:3002',
VIEW_ITEM: 'http://localhost:3003',
API: `http://localhost:8888/${API_ENDPOINT}`
}
}
}
module.exports = config;