Merge pull request #121 from getmaxun/manual-setup-error
fix: handle `undefined` backend url in local setup
This commit is contained in:
@@ -650,7 +650,7 @@ export async function handleRunRecording(id: string, userId: string) {
|
||||
throw new Error('browserId or runId or userId is undefined');
|
||||
}
|
||||
|
||||
const socket = io(`${process.env.BACKEND_URL}/${browserId}`, {
|
||||
const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, {
|
||||
transports: ['websocket'],
|
||||
rejectUnauthorized: false
|
||||
});
|
||||
|
||||
@@ -223,7 +223,7 @@ export async function handleRunRecording(id: string, userId: string) {
|
||||
throw new Error('browserId or runId or userId is undefined');
|
||||
}
|
||||
|
||||
const socket = io(`${process.env.BACKEND_URL}/${browserId}`, {
|
||||
const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, {
|
||||
transports: ['websocket'],
|
||||
rejectUnauthorized: false
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const apiUrl = import.meta.env.VITE_BACKEND_URL;
|
||||
export const apiUrl = import.meta.env.VITE_BACKEND_URL ? import.meta.env.VITE_BACKEND_URL : 'http://localhost:8080'
|
||||
Reference in New Issue
Block a user