Oleg Shuralev 5 vuotta sitten
vanhempi
commit
affd24560f
5 muutettua tiedostoa jossa 35 lisäystä ja 1 poistoa
  1. 29 0
      README.md
  2. 2 0
      api/README.md
  3. 1 0
      frontend/.env
  4. 2 0
      frontend/README.md
  5. 1 1
      frontend/src/lib/constants.ts

+ 29 - 0
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
+```

+ 2 - 0
api/README.md

@@ -0,0 +1,2 @@
+# kafka-ui
+UI for Apache Kafka management

+ 1 - 0
frontend/.env

@@ -0,0 +1 @@
+REACT_APP_API_URL=http://localhost:3004

+ 2 - 0
frontend/README.md

@@ -0,0 +1,2 @@
+# kafka-ui
+UI for Apache Kafka management

+ 1 - 1
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;