first commit
This commit is contained in:
10
health_check2.sh
Executable file
10
health_check2.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the URL of your health endpoint
|
||||
HEALTH_ENDPOINT="http://localhost:3000/health"
|
||||
|
||||
# Make a GET request to the health endpoint and capture the response
|
||||
response=$(wget -qO- --connect-timeout=2 --server-response "$HEALTH_ENDPOINT" 2>&1 | awk '/^HTTP/{print $2}')
|
||||
|
||||
# Display the HTTP status code from the response
|
||||
echo "HTTP status code: $response"
|
||||
Reference in New Issue
Block a user