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

This commit is contained in:
Peter Zich 2024-06-04 18:27:01 -07:00 committed by GitHub
parent 9261c2c24e
commit b7b4b5beba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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