You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
318 B

11 months ago
  1. #!/bin/bash
  2. # Send a request to the specified URL
  3. response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://localhost:3001/api/ping)
  4. # If the HTTP response code is 200 (OK), the server is up
  5. if [ "$response" -eq 200 ]; then
  6. echo "Server is up"
  7. exit 0
  8. else
  9. echo "Server is down"
  10. exit 1
  11. fi