Skip to content

Commit 34752ad

Browse files
authored
Merge pull request #121 from getmaxun/manual-setup-error
fix: handle `undefined` backend url in local setup
2 parents 9861786 + 56d2371 commit 34752ad

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

server/src/api/record.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ export async function handleRunRecording(id: string, userId: string) {
650650
throw new Error('browserId or runId or userId is undefined');
651651
}
652652

653-
const socket = io(`${process.env.BACKEND_URL}/${browserId}`, {
653+
const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, {
654654
transports: ['websocket'],
655655
rejectUnauthorized: false
656656
});

server/src/workflow-management/scheduler/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export async function handleRunRecording(id: string, userId: string) {
223223
throw new Error('browserId or runId or userId is undefined');
224224
}
225225

226-
const socket = io(`${process.env.BACKEND_URL}/${browserId}`, {
226+
const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, {
227227
transports: ['websocket'],
228228
rejectUnauthorized: false
229229
});

src/apiConfig.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)