adjust api endpoint
This commit is contained in:
parent
a97554bf32
commit
e20d0f0524
@ -1,6 +1,9 @@
|
||||
import { Product, ProductCreate, Shop, ShopCreate, ShoppingEvent, ShoppingEventCreate, Brand, BrandCreate, Grocery, GroceryCreate, GroceryCategory, GroceryCategoryCreate } from '../types';
|
||||
|
||||
const API_BASE_URL = '/api';
|
||||
// Use different API URLs based on environment
|
||||
const API_BASE_URL = process.env.NODE_ENV === 'production'
|
||||
? '/api' // Use nginx proxy in production
|
||||
: 'http://localhost:8000'; // Direct backend connection in development
|
||||
|
||||
const api = {
|
||||
get: <T>(url: string): Promise<{ data: T }> =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user