version with dinamic port

This commit is contained in:
anovazzi1 2023-03-17 17:46:10 -03:00
commit f0261fed80
2 changed files with 4 additions and 1 deletions

View file

@ -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<AxiosResponse<APIObjectType>> {
return await axios.get(`${backendUrl}/all`);