generated from fahricansecer/boilerplate-fe
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { createApiClient } from './create-api-client';
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api';
|
||||
const API_URL = typeof window === 'undefined'
|
||||
? (process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api')
|
||||
: (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api');
|
||||
|
||||
export const apiClient = createApiClient(API_URL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user