diff --git a/frontend/src/config.ts b/frontend/src/config.ts new file mode 100644 index 00000000..21c34464 --- /dev/null +++ b/frontend/src/config.ts @@ -0,0 +1,4 @@ +export const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:5001' +export const OPENCODE_API_ENDPOINT = import.meta.env.VITE_OPENCODE_PORT + ? `http://localhost:${import.meta.env.VITE_OPENCODE_PORT}` + : 'http://localhost:5551' \ No newline at end of file diff --git a/frontend/src/constants/api.ts b/frontend/src/constants/api.ts index abb8056a..47fbbb9c 100644 --- a/frontend/src/constants/api.ts +++ b/frontend/src/constants/api.ts @@ -1 +1 @@ -export { API_BASE_URL, OPENCODE_API_ENDPOINT } from '../config' \ No newline at end of file +export { API_BASE_URL, OPENCODE_API_ENDPOINT } from '@/config' \ No newline at end of file