mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 12:34:41 +08:00
version with dinamic port
This commit is contained in:
@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user