Lần đầu chạy sẽ cần cài đặt pnpm. Chạy lệnh sau:
npm install -g pnpm@latestSau đó chạy dự án bình thường:
- Cài đặt dependency:
pnpm install- Cập nhật database
pnpm update-db- Chạy code:
pnpm devTrang web giờ đang ở http://localhost:5173.
Trước hết ta xem có API nào để gọi. Có thể truy cập trang http://localhost:5173/doc để xem danh sách tất cả API của backend.

Sau khi biết có API thì sử dụng httpClient từ @/lib/client
import { Button } from "./components/ui/button";
import httpClient from "@/lib/client";
function App() {
async function doSomething() {
console.log("api result: ", await httpClient.get("/boards"));
}
return (
<div>
<h1>Welcome to the App!</h1>
<Button onClick={doSomething}>Hello</Button>
</div>
);
}
export default App;