Skip to content

Commit

Permalink
feat: make client port configurable through environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
0x-r4bbit committed Sep 12, 2018
1 parent 39742c3 commit 228d329
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
"scripts": {
"ui-assets": "copy-aragon-ui-assets -n aragon-ui ./build",
"start": "npm run ui-assets && parcel serve src/index.html --port 3000 --out-dir ./build --no-cache",
"start": "node scripts/start.js",
"start:local": "scripts/launch-local.sh",
"start:mainnet": "REACT_APP_ETH_NETWORK_TYPE=mainnet npm start",
"start:rinkeby": "npm start",
Expand Down
7 changes: 7 additions & 0 deletions scripts/start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const execute = require('child_process').execSync

const clientPort = process.env.REACT_APP_PORT || 3000

execute(`npm run ui-assets && parcel serve src/index.html --port ${clientPort} --out-dir ./build --no-cache`, {
stdio: 'inherit'
})

0 comments on commit 228d329

Please sign in to comment.