2
1

client.sh 573 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 --port 3000"
  8. serverCommand="NODE_ENV=dev node dist/server"
  9. if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
  10. eval $clientCommand
  11. else
  12. npm run build:server
  13. node node_modules/.bin/concurrently -k \
  14. "$clientCommand" \
  15. "$serverCommand"
  16. fi