Add frontend environment variables to set host and port it expects the backend API to be

This commit is contained in:
continuist 2025-06-26 22:35:12 -04:00
parent 52b938ca64
commit a14f29423d

View file

@ -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;