version with dinamic port
This commit is contained in:
parent
363955f93e
commit
f0261fed80
2 changed files with 4 additions and 1 deletions
|
|
@ -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`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue