Merge branch 'feat/environment-variables' into 'main'
Introduce backend URL environment variable See merge request ics/sp/2025/n25b/pepperplus-ui!53
This commit was merged in pull request #53.
This commit is contained in:
@@ -6,6 +6,7 @@ import orderPhaseNodeArray from "../../utils/orderPhaseNodes";
|
||||
import useFlowStore from './visualProgrammingUI/VisProgStores';
|
||||
import { NodeReduces } from './visualProgrammingUI/NodeRegistry';
|
||||
import type { PhaseNode } from "./visualProgrammingUI/nodes/PhaseNode";
|
||||
import { API_BASE_URL } from "../../config/api.ts";
|
||||
|
||||
/**
|
||||
* Reduces the graph into its phases' information and recursively calls their reducing function
|
||||
@@ -28,7 +29,7 @@ export function runProgram() {
|
||||
const program = {phases}
|
||||
console.log(JSON.stringify(program, null, 2));
|
||||
fetch(
|
||||
"http://localhost:8000/program",
|
||||
`${API_BASE_URL}/program`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {"Content-Type": "application/json"},
|
||||
@@ -43,4 +44,4 @@ export function runProgram() {
|
||||
useProgramStore.getState().setProgramState(structuredClone(program));
|
||||
}).catch(() => console.log("Failed to send program to the backend."));
|
||||
console.log(program);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user