client.sh 596 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -eu
  3. clientConfiguration="hmr"
  4. if [ ! -z ${2+x} ] && [ "$2" = "--ar-locale" ]; then
  5. clientConfiguration="ar-locale"
  6. fi
  7. clientCommand="cd client && node --max_old_space_size=4096 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --disable-host-check --port 3000"
  8. serverCommand="npm run build:server && NODE_ENV=dev node dist/server"
  9. if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
  10. eval $clientCommand
  11. else
  12. node node_modules/.bin/concurrently -k \
  13. "$clientCommand" \
  14. "$serverCommand"
  15. fi