From 1e80e7ed0676cba9b2dab11a705c9e376536ede9 Mon Sep 17 00:00:00 2001 From: kaushik327 Date: Thu, 18 Apr 2024 17:23:56 -0500 Subject: [PATCH] call the right api from frontend --- .github/workflows/node_to_gh.yml | 3 +++ admin-api-frontend/package.json | 2 +- admin-api-frontend/src/.env | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 admin-api-frontend/src/.env diff --git a/.github/workflows/node_to_gh.yml b/.github/workflows/node_to_gh.yml index 70f133f..745ff05 100644 --- a/.github/workflows/node_to_gh.yml +++ b/.github/workflows/node_to_gh.yml @@ -4,6 +4,9 @@ on: push: branches: [ "main" ] +env: + REACT_APP_BASE_URL: "https://83hq7g76ng.execute-api.us-east-1.amazonaws.com/Stage/api/v1/" + jobs: build: diff --git a/admin-api-frontend/package.json b/admin-api-frontend/package.json index 7d1f11f..c58d815 100644 --- a/admin-api-frontend/package.json +++ b/admin-api-frontend/package.json @@ -24,7 +24,7 @@ "web-vitals": "^2.1.4" }, "scripts": { - "start": "react-scripts start", + "start": "source src/.env && react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/admin-api-frontend/src/.env b/admin-api-frontend/src/.env new file mode 100644 index 0000000..51abfdf --- /dev/null +++ b/admin-api-frontend/src/.env @@ -0,0 +1 @@ +export REACT_APP_BASE_URL="https://83hq7g76ng.execute-api.us-east-1.amazonaws.com/Stage/api/v1/" \ No newline at end of file