Add frontend environment variables to set host and port it expects the backend API to be
This commit is contained in:
parent
52b938ca64
commit
a14f29423d
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue