starting
This commit is contained in:
commit
a764c92a0b
11 changed files with 1081 additions and 0 deletions
21
frontend/app/page.tsx
Normal file
21
frontend/app/page.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function Home() {
|
||||
const [message, setMessage] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
fetch("http://localhost:8000/api/hello")
|
||||
.then((res) => res.json())
|
||||
.then((data) => setMessage(data.message));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<main style={{ padding: "2rem", fontFamily: "system-ui" }}>
|
||||
<h1>FastAPI + Next.js</h1>
|
||||
<p>{message || "Loading..."}</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue