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 2ff2400 commit 69e8bcaCopy full SHA for 69e8bca
frontend/src/services/api.js
@@ -1,4 +1,6 @@
1
-const API_BASE_URL = 'http://localhost:3001/api';
+const API_BASE_URL = window.location.hostname.endsWith('.gitpod.dev')
2
+ ? 'https://3001--01965c3b-370d-7463-845d-125a1daa5fab.eu01.gitpod.dev/api'
3
+ : 'http://localhost:3001/api';
4
5
export const fetchMovies = async () => {
6
try {
@@ -12,4 +14,4 @@ export const fetchMovies = async () => {
12
14
console.error('Error fetching movies:', error);
13
15
throw error;
16
}
-};
17
+};
0 commit comments