fix: Add production fallbacks for API and WebSocket URLs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const API_BASE_URL = import.meta.env.VITE_API_URL || "http://localhost:8080/api";
|
||||
const API_BASE_URL = import.meta.env.VITE_API_URL || "https://docnest-backend-mingda.fly.dev";
|
||||
|
||||
export async function authFetch(url: string, options?: RequestInit): Promise<Response> {
|
||||
const token = localStorage.getItem('auth_token');
|
||||
|
||||
@@ -4,7 +4,7 @@ import { WebsocketProvider } from "y-websocket";
|
||||
import * as Y from "yjs";
|
||||
import { documentsApi } from "../api/document";
|
||||
|
||||
const WS_URL = import.meta.env.VITE_WS_URL;
|
||||
const WS_URL = import.meta.env.VITE_WS_URL || "wss://docnest-backend-mingda.fly.dev";
|
||||
|
||||
export interface YjsProviders {
|
||||
ydoc: Y.Doc;
|
||||
|
||||
Reference in New Issue
Block a user