Skip to content

Commit

Permalink
fixed URL issues in React app; closes #73
Browse files Browse the repository at this point in the history
  • Loading branch information
Parth Kapil authored and Parth Kapil committed Mar 30, 2022
1 parent f2950dc commit f361329
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Client/.env.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_AUTH_API_URI = http://localhost:8000/api
REACT_APP_CACHE_API_URI = http://localhost:8080/api
REACT_APP_AUTH_API_URI = http://localhost:30000/api
REACT_APP_CACHE_API_URI = http://localhost:32000/api
8 changes: 6 additions & 2 deletions Client/src/pages/plotPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const PlotPage = () => {
const { state, dispatch } = useContext(Context);
const { user } = state;

const CACHE_API = process.env.REACT_APP_CACHE_API_URI;

let navigate = useNavigate();
//redirect user to homePage if they are not logged in
useEffect(() => {
Expand All @@ -48,7 +50,8 @@ const PlotPage = () => {
const [isVideo, setIsVideo] = useState(false);
const [isOpen, setIsOpen] = useState(false);

let cache_api = "http://localhost:8080/api/getplot";
let cache_api = CACHE_API + "/getplot";
// let cache_api = "http://localhost:8080/api/getplot";
// const cache_api = "http://localhost:8080/api/getvideo";

const handleSubmit = async () => {
Expand Down Expand Up @@ -81,7 +84,8 @@ const PlotPage = () => {
setLoading(true);

if (isVideo) {
cache_api = "http://localhost:8080/api/getvideo";
cache_api = CACHE_API + "/getvideo";
// cache_api = "http://localhost:8080/api/getvideo";
}
console.log(cache_api);
const { data } = await axios.post(`${cache_api}`, body, {
Expand Down
2 changes: 1 addition & 1 deletion kube/auth-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: node-app
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: node-app
Expand Down
4 changes: 2 additions & 2 deletions kube/data-ingestor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: di-app
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: di-app
Expand All @@ -30,4 +30,4 @@ spec:
image: ingestor-app
ports:
- containerPort: 5678
imagePullPolicy: Never
imagePullPolicy: Never

0 comments on commit f361329

Please sign in to comment.