Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
358 B
TypeScript
Raw Normal View History

2025-07-22 16:21:29 +01:00
// Runtime configuration access
declare global {
interface Window {
runtimeConfig?: {
apiBaseUrl?: string;
};
}
}
2025-07-01 14:22:19 +01:00
export const makeApiUrl = (endpoint: string): string => {
2025-07-22 16:21:29 +01:00
const baseUrl = window.runtimeConfig?.apiBaseUrl || 'http://localhost:8080';
2025-07-01 14:22:19 +01:00
// For production, combine base URL with endpoint
return `${baseUrl}${endpoint}`;
};