orakzai-io commited on
Commit
66f62e1
·
1 Parent(s): 3ecd785

Fixed connectivity issues

Browse files
Files changed (1) hide show
  1. Frontend/src/api.ts +2 -1
Frontend/src/api.ts CHANGED
@@ -1,4 +1,5 @@
1
- export const API_URL = import.meta.env.VITE_API_URL || 'http://127.0.0.1:8000';
 
2
 
3
  export async function submitUrls(urls: string[]) {
4
  const response = await fetch(`${API_URL}/scrape`, {
 
1
+ const envUrl = import.meta.env.VITE_API_URL;
2
+ export const API_URL = (envUrl !== undefined && envUrl !== null) ? envUrl : 'http://127.0.0.1:8000';
3
 
4
  export async function submitUrls(urls: string[]) {
5
  const response = await fetch(`${API_URL}/scrape`, {