diff --git a/frontend/package.json b/frontend/package.json index 88b471f0c..fedb61227 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,7 +25,9 @@ "i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng xi18n --ivy --out-file ./src/locale/messages.xlf", "i18n-pull-from-transifex": "tx pull -a --parallel --minimum-perc 1 --force", "serve": "ng serve --proxy-config proxy.conf.json", + "serve:stg": "ng serve --proxy-config proxy.stg.conf.json --verbose", "start": "npm run generate-config && npm run sync-assets-dev && ng serve --proxy-config proxy.conf.json", + "start:stg": "npm run generate-config && npm run sync-assets-dev && ng serve --proxy-config proxy.stg.conf.json", "build": "npm run generate-config && ng build --prod --localize && npm run sync-assets && npm run build-mempool.js", "sync-assets": "node sync-assets.js && rsync -av ./dist/mempool/browser/en-US/resources ./dist/mempool/browser/resources", "sync-assets-dev": "node sync-assets.js dev", diff --git a/frontend/proxy.stg.conf.json b/frontend/proxy.stg.conf.json new file mode 100644 index 000000000..18b26b602 --- /dev/null +++ b/frontend/proxy.stg.conf.json @@ -0,0 +1,68 @@ +{ + "/api/v1/ws": { + "target": "https://mempool.ninja", + "secure": false, + "ws": true + }, + "/api/*": { + "target": "https://mempool.ninja", + "secure": false, + "changeOrigin": true, + "logLevel": "debug", + "pathRewrite": { + "^/api": "https://mempool.ninja/api" + }, + "timeout": 3600000 + }, + "/testnet/api/v1/ws": { + "target": "https://mempool.ninja/testnet", + "secure": false, + "ws": true, + "pathRewrite": { + "^/testnet/api": "/api/v1/ws" + } + }, + "/testnet/api/v1/*": { + "target": "https://mempool.ninja/testnet", + "secure": false, + "changeOrigin": true, + "pathRewrite": { + "^/testnet/api/v1": "/api/v1" + }, + "timeout": 3600000 + }, + "/bisq/api/v1/ws": { + "target": "https://mempool.ninja/bisq", + "secure": false, + "ws": true, + "pathRewrite": { + "^/bisq/api": "/api/v1/ws" + } + }, + "/bisq/api/*": { + "target": "https://mempool.ninja/bisq", + "secure": false, + "changeOrigin": true, + "pathRewrite": { + "^/bisq/api/": "/api/v1/bisq/" + }, + "timeout": 3600000 + }, + "/liquid/api/v1/ws": { + "target": "https://mempool.ninja/liquid", + "secure": false, + "ws": true, + "pathRewrite": { + "^/liquid/api": "/api/v1/ws" + } + }, + "/liquid/api/*": { + "target": "https://mempool.ninja/liquid", + "secure": false, + "changeOrigin": true, + "pathRewrite": { + "^/liquid/api/": "/api/v1/liquid/" + }, + "timeout": 3600000 + } +}