Browse Source

Use PORT env var to customize script/develop port (#502)

Peter Zich 11 months ago
parent
commit
b7b4b5beba
1 changed files with 5 additions and 1 deletions
  1. 5 1
      script/develop

+ 5 - 1
script/develop

@@ -1,6 +1,10 @@
 # Stop on errors
 set -e
 
+if [ -z "$PORT" ]; then
+  PORT=5001
+fi
+
 cd "$(dirname "$0")/.."
 
 rm -rf dist
@@ -11,6 +15,6 @@ trap "kill 0" EXIT
 # Run tsc once as rollup expects those files
 npm exec -- tsc || true
 
-npm exec -- serve -p 5001 &
+npm exec -- serve -p "$PORT" &
 npm exec -- tsc --watch &
 npm exec -- rollup -c --watch