diff --git a/frontend/package.json b/frontend/package.json index 508f5d12ef..39f97fa79b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,6 +27,7 @@ "build:assets": "NODE_ENV=production webpack -p", "build:html": "cp public/*.* dist/.", "start": "NODE_ENV=development webpack-dev-server --config webpack.config.js --progress --colors --port 3000", + "start:heroku": "UNLEASH_API=http://unleash.herokuapp.com npm run start", "lint": "eslint . --ext=js,jsx", "test": "npm run build", "test:ci": "npm run test", diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index 88ccd980d0..efea565f3d 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -71,7 +71,8 @@ module.exports = { devServer: { proxy: { '/api': { - target: 'http://localhost:4242', + target: process.env.UNLEASH_API || 'http://localhost:4242', + changeOrigin: true, secure: false, }, },