From a14f29423d75baa41cf392f351a802bb3ba00fe4 Mon Sep 17 00:00:00 2001 From: continuist Date: Thu, 26 Jun 2025 22:35:12 -0400 Subject: [PATCH] Add frontend environment variables to set host and port it expects the backend API to be --- frontend/src/lib/api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 7f98fa9..3dd272c 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -11,7 +11,9 @@ import axios from 'axios'; -const API_BASE_URL = 'http://127.0.0.1:3000'; +const API_HOST = process.env.NEXT_PUBLIC_API_HOST || '127.0.0.1'; +const API_PORT = process.env.NEXT_PUBLIC_API_PORT || '3001'; +const API_BASE_URL = `http://${API_HOST}:${API_PORT}`; export interface User { id: string;