We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1c1592 commit 91d703bCopy full SHA for 91d703b
frontend/pages/index.js
@@ -10,12 +10,12 @@ export default function Home() {
10
const fetchData = async () => {
11
try {
12
// First check if backend is healthy
13
- const healthCheck = await axios.get(`${process.env.NEXT_PUBLIC_API_URL}/api/health`);
+ const healthCheck = await axios.get(`/api/health`);
14
15
if (healthCheck.data.status === 'healthy') {
16
setStatus('Backend is connected!');
17
// Then fetch the message
18
- const response = await axios.get(`${process.env.NEXT_PUBLIC_API_URL}/api/message`);
+ const response = await axios.get(`/api/message`);
19
setMessage(response.data.message);
20
}
21
} catch (error) {
0 commit comments