From 87a76b6227c6818ca8df363327a35d8f23586dc4 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Mon, 2 Jan 2017 22:07:50 +0100 Subject: [PATCH] Added option to use hosted heroku api when developing --- frontend/package.json | 1 + frontend/webpack.config.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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, }, },