1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Added option to use hosted heroku api when developing

This commit is contained in:
ivaosthu 2017-01-02 22:07:50 +01:00
parent cb879b29fe
commit 87a76b6227
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@
"build:assets": "NODE_ENV=production webpack -p", "build:assets": "NODE_ENV=production webpack -p",
"build:html": "cp public/*.* dist/.", "build:html": "cp public/*.* dist/.",
"start": "NODE_ENV=development webpack-dev-server --config webpack.config.js --progress --colors --port 3000", "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", "lint": "eslint . --ext=js,jsx",
"test": "npm run build", "test": "npm run build",
"test:ci": "npm run test", "test:ci": "npm run test",

View File

@ -71,7 +71,8 @@ module.exports = {
devServer: { devServer: {
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:4242', target: process.env.UNLEASH_API || 'http://localhost:4242',
changeOrigin: true,
secure: false, secure: false,
}, },
}, },