Skip to content

Commit

Permalink
feat: add hz env
Browse files Browse the repository at this point in the history
  • Loading branch information
xsteadybcgo committed Sep 7, 2021
1 parent e874527 commit 2964989
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"build": "react-app-rewired build",
"build:prod": "cross-env REACT_APP_NODE_ENV=production react-app-rewired build",
"build:pre": "cross-env REACT_APP_NODE_ENV=pre-production react-app-rewired build",
"build:hz": "cross-env REACT_APP_NODE_ENV=pre-production-hz react-app-rewired build",
"test": "cross-env REACT_APP_NODE_ENV=test react-app-rewired test"
},
"eslintConfig": {
Expand Down
7 changes: 6 additions & 1 deletion src/config/origin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ if (process.env.REACT_APP_NODE_ENV === 'development') {
API_DOMAIN = '/accountApi/api'
// API_DOMAIN = 'https://elara.patract.io';

ENDPOINTS_URL = 'https://test-elara2.patract.cn/api'
ENDPOINTS_URL = 'https://test-service.elara2.patract.cn'
WSS_ENDPOINTS_URL = 'wss://test-service.elara2.patract.cn'
} else if (process.env.REACT_APP_NODE_ENV === 'pre-production') {
API_DOMAIN = '/api'

ENDPOINTS_URL = 'https://test-pro.service.elara2.patract.cn'
WSS_ENDPOINTS_URL = 'wss://test-pro.service.elara2.patract.cn'
} else if (process.env.REACT_APP_NODE_ENV === 'pre-production-hz') {
API_DOMAIN = '/api'

ENDPOINTS_URL = 'https://test-service.elara2.patract.cn'
WSS_ENDPOINTS_URL = 'wss://test-service.elara2.patract.cn'
} else if (process.env.REACT_APP_NODE_ENV === 'production') {
API_DOMAIN = '/api'

Expand Down

0 comments on commit 2964989

Please sign in to comment.