play.sh 227 B

123456789101112131415
  1. #!/bin/sh
  2. set -eu
  3. if [ ! -f "dist/server.js" ]; then
  4. echo "Missing server file (server.js)."
  5. exit -1
  6. fi
  7. max=${1:-3}
  8. for i in $(seq 1 "$max"); do
  9. NODE_ENV=test NODE_APP_INSTANCE=$i node dist/server.js &
  10. sleep 1
  11. done