codenuk_frontend_mine/src/config/backend.ts
2025-10-10 08:40:18 +05:30

13 lines
325 B
TypeScript

//
export const BACKEND_URL = 'http://localhost:8000';
export const SOCKET_URL = BACKEND_URL;
export const API_BASE_URL = BACKEND_URL;
export const getApiUrl = (endpoint: string): string => {
const cleanEndpoint = endpoint.startsWith('/') ? endpoint.slice(1) : endpoint;
return `${BACKEND_URL}/${cleanEndpoint}`;
};