From f0261fed806514a6f16e67462271ae237bf92cd3 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 17 Mar 2023 17:46:10 -0300 Subject: [PATCH] version with dinamic port --- src/frontend/public/index.html | 3 +++ src/frontend/src/controllers/NodesServices/index.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/public/index.html b/src/frontend/public/index.html index aa19f07de..c1953d6b8 100644 --- a/src/frontend/public/index.html +++ b/src/frontend/public/index.html @@ -5,6 +5,9 @@ LangFLow + diff --git a/src/frontend/src/controllers/NodesServices/index.ts b/src/frontend/src/controllers/NodesServices/index.ts index f3fc86e5d..40e98821c 100644 --- a/src/frontend/src/controllers/NodesServices/index.ts +++ b/src/frontend/src/controllers/NodesServices/index.ts @@ -1,7 +1,7 @@ import { APIObjectType, sendAllProps } from '../../types/api/index'; import axios, { AxiosResponse } from "axios"; -const backendUrl = process.env.BACKEND || "http://localhost:7860"; +const backendUrl = window.sessionStorage.getItem('port') || "http://localhost:7860"; export async function getAll():Promise> { return await axios.get(`${backendUrl}/all`);