version with dinamic port
This commit is contained in:
parent
363955f93e
commit
f0261fed80
2 changed files with 4 additions and 1 deletions
|
|
@ -5,6 +5,9 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LangFLow</title>
|
||||
<script>
|
||||
window.sessionStorage.setItem("port","http://localhost:7860")
|
||||
</script>
|
||||
</head>
|
||||
<body id='body' style="width: 100%; height:100%">
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
|
|
|||
|
|
@ -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