Skip to content

Commit

Permalink
Use PORT env var to customize script/develop port (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzich committed Jun 5, 2024
1 parent 9261c2c commit b7b4b5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/develop
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Stop on errors
set -e

if [ -z "$PORT" ]; then
PORT=5001
fi

cd "$(dirname "$0")/.."

rm -rf dist
Expand All @@ -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

0 comments on commit b7b4b5b

Please sign in to comment.