File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33set -e
44
5- # Get the API ID for FWS API Gateway from LocalStack
5+ # Get the API ID for FWS API Gateway from LocalStack.
66API_ID=$( docker exec localstack-main awslocal apigateway get-rest-apis --query " items[?name=='FWS API Gateway'].id" --output text 2> /dev/null)
77
88if [[ -z " $API_ID " ]]; then
1212
1313echo " Found FWS API Gateway with ID: $API_ID "
1414
15- # Build the full API URL
15+ # Build the full API URL.
1616API_URL=" http://localstack-main:4566/_aws/execute-api/${API_ID} /local"
1717
18- # Update the .env file
18+ # Update the .env file.
1919ENV_FILE=" $( dirname " $0 " ) /../.env"
2020
2121if [[ ! -f " $ENV_FILE " ]]; then
2222 echo " Error: .env file not found at $ENV_FILE " >&2
2323 exit 1
2424fi
2525
26- # Use sed to replace the FWS_API_URL line
26+ # Use sed to replace the FWS_API_URL line.
2727if grep -q " ^FWS_API_URL=" " $ENV_FILE " ; then
2828 sed -i " s|^FWS_API_URL=.*|FWS_API_URL=${API_URL} |" " $ENV_FILE "
2929 echo " Updated FWS_API_URL in $ENV_FILE "
You can’t perform that action at this time.
0 commit comments