diff --git a/.gitignore b/.gitignore index 15d9e45a..9c7517c5 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ terracotta.sqlite __pycache__ *.egg-info *.pyc + +# frontend config +proxy-table.json diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index e1f5db0f..a2f1e47f 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['react-app', 'eslint:recommended'], + extends: ['react-app', 'eslint:recommended', 'eslint-config-prettier'], rules: { 'react/prop-types': 'off', 'no-unused-vars': 'off', diff --git a/frontend/dev-proxy/proxy-table.cloud.json b/frontend/dev-proxy/proxy-table.cloud.json new file mode 100644 index 00000000..3ce208a9 --- /dev/null +++ b/frontend/dev-proxy/proxy-table.cloud.json @@ -0,0 +1,14 @@ +{ + "/raster": { + "target": "https://jamaica.infrastructureresilience.org", + "changeOrigin": true + }, + "/vector": { + "target": "https://jamaica.infrastructureresilience.org", + "changeOrigin": true + }, + "/api": { + "target": "https://jamaica.infrastructureresilience.org", + "changeOrigin": true + } +} diff --git a/frontend/dev-proxy/proxy-table.dev.json b/frontend/dev-proxy/proxy-table.dev.json new file mode 100644 index 00000000..3ca165d5 --- /dev/null +++ b/frontend/dev-proxy/proxy-table.dev.json @@ -0,0 +1,23 @@ +{ + "/raster": { + "target": "http://localhost:5000", + "changeOrigin": true, + "pathRewrite": { + "^/raster": "/" + } + }, + "/vector": { + "target": "http://localhost:8080", + "changeOrigin": true, + "pathRewrite": { + "^/vector": "/" + } + }, + "/api": { + "target": "http://localhost:8888", + "changeOrigin": true, + "pathRewrite": { + "^/api": "/" + } + } +} diff --git a/frontend/public/index.html b/frontend/index.html similarity index 95% rename from frontend/public/index.html rename to frontend/index.html index 70179a05..3a5aaf92 100644 --- a/frontend/public/index.html +++ b/frontend/index.html @@ -20,6 +20,7 @@ You need to enable JavaScript to run this app.
+