Skip to content

Commit

Permalink
Merge pull request #352 from PascalPrecht/feat/client-port-env-var
Browse files Browse the repository at this point in the history
feat: make client port configurable through environment variable
  • Loading branch information
izqui committed Sep 18, 2018
2 parents d8ed1a5 + 25211a5 commit 66f86ff
Show file tree
Hide file tree
Showing 2 changed files with 10 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": "scripts/start",
"start:local": "scripts/launch-local.sh",
"start:mainnet": "REACT_APP_ETH_NETWORK_TYPE=mainnet npm start",
"start:rinkeby": "npm start",
Expand Down
9 changes: 9 additions & 0 deletions scripts/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node

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 66f86ff

Please sign in to comment.