From 247a9f8b9f7840549a0220e29bb2e06ce8aa0a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Gryglicki?= Date: Wed, 27 Nov 2024 06:33:57 +0000 Subject: [PATCH] ngrok details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ɓukasz Gryglicki --- cla-backend/scripts/health.sh | 7 +++++++ dev.md | 3 +++ ngrok.sh | 2 ++ 3 files changed, 12 insertions(+) create mode 100755 cla-backend/scripts/health.sh create mode 100755 ngrok.sh diff --git a/cla-backend/scripts/health.sh b/cla-backend/scripts/health.sh new file mode 100755 index 000000000..22788414d --- /dev/null +++ b/cla-backend/scripts/health.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# API_URL=https://3f13-147-75-85-27.ngrok-free.app (defaults to localhost:5000) +if [ -z "$API_URL" ] +then + export API_URL="http://localhost:5000" +fi +curl -s "${API_URL}/v2/health" | jq -r '.' diff --git a/dev.md b/dev.md index 819cb6b2e..736a3525b 100644 --- a/dev.md +++ b/dev.md @@ -202,6 +202,9 @@ open http://localhost:5000/v2/health open http://localhost:5000/v2/user/ ``` +To expose service running on the localhost to the outside world use: `` ./ngrok.sh ``. +And then tets via: `` API_URL='https://[redacted].ngrok-free.app' ./scripts/health.sh `` from another host (anywhere in the world). + ## Building and Running the Go Backend Current Endpoints: diff --git a/ngrok.sh b/ngrok.sh new file mode 100755 index 000000000..829abad2f --- /dev/null +++ b/ngrok.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ngrok http http://localhost:5000