We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b5265c commit adb9bf2Copy full SHA for adb9bf2
env.sample
@@ -0,0 +1 @@
1
+REACT_APP_BACKEND_SERVER='https://YOUR_API_URL/';
src/config/constant.js
@@ -1 +1,8 @@
-export const API_SERVER = "http://localhost:5000/api/";
+let BACKEND_SERVER = null;
2
+if (process.env.REACT_APP_BACKEND_SERVER) {
3
+ BACKEND_SERVER = process.env.REACT_APP_BACKEND_SERVER;
4
+} else {
5
+ BACKEND_SERVER = "http://localhost:5000/api/";
6
+}
7
+
8
+export const API_SERVER = BACKEND_SERVER;
0 commit comments