feat: initialize backend service with Express, SQLite logging, and API utilities
Deploy Backendia / deploy (push) Successful in 5m0s
Deploy Backendia / deploy (push) Successful in 5m0s
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
export const API_BASE_URL = 'http://127.0.0.1:3000';
|
||||
const isServer = typeof window === 'undefined';
|
||||
export const API_BASE_URL = isServer
|
||||
? `http://127.0.0.1:${process.env.PORT || 3000}`
|
||||
: '';
|
||||
|
||||
export async function fetchApi(endpoint: string) {
|
||||
const res = await fetch(`${API_BASE_URL}${endpoint}`, {
|
||||
|
||||
Reference in New Issue
Block a user