From affd24560f95ec7eb583fae1fce6e9400cdbcd0b Mon Sep 17 00:00:00 2001 From: Oleg Shuralev Date: Sun, 19 Jan 2020 21:08:34 +0300 Subject: [PATCH] Cleanup --- README.md | 29 +++++++++++++++++++++++++++++ api/README.md | 2 ++ frontend/.env | 1 + frontend/README.md | 2 ++ frontend/src/lib/constants.ts | 2 +- 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 api/README.md create mode 100644 frontend/.env create mode 100644 frontend/README.md diff --git a/README.md b/README.md index 3d6a36a47b..916c9a186f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ # kafka-ui UI for Apache Kafka management + +## Frontend + +### Env variables +Pls update `./frontend/.env` file + +``` +# API url +REACT_APP_API_URL=http://localhost:3004 +``` + +### Start App + +``` +cd ./frontend +npm install + +npm start +``` + + +## API + +``` +cd ./frontend +npm install + +npm run dev +``` diff --git a/api/README.md b/api/README.md new file mode 100644 index 0000000000..3d6a36a47b --- /dev/null +++ b/api/README.md @@ -0,0 +1,2 @@ +# kafka-ui +UI for Apache Kafka management diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 0000000000..4f6c9470ec --- /dev/null +++ b/frontend/.env @@ -0,0 +1 @@ +REACT_APP_API_URL=http://localhost:3004 diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000000..3d6a36a47b --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,2 @@ +# kafka-ui +UI for Apache Kafka management diff --git a/frontend/src/lib/constants.ts b/frontend/src/lib/constants.ts index e2812085eb..8cc6b562be 100644 --- a/frontend/src/lib/constants.ts +++ b/frontend/src/lib/constants.ts @@ -6,7 +6,7 @@ export const BASE_PARAMS: RequestInit = { }, }; -export const BASE_URL = 'http://localhost:3004'; +export const BASE_URL = process.env.REACT_APP_API_URL; export const TOPIC_NAME_VALIDATION_PATTERN = RegExp(/^[.,A-Za-z0-9_-]+$/); export const MILLISECONDS_IN_DAY = 86_400_000;