feat: initialize backend service with Express, SQLite logging, and API utilities
Deploy Backendia / deploy (push) Successful in 5m0s

This commit is contained in:
streaper2
2026-08-26 08:42:16 +02:00
parent 7923d1b2b2
commit 9a429d476d
4 changed files with 102 additions and 60 deletions
+4 -1
View File
@@ -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}`, {