Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Hono RPC with React Monorepo Template

DEV Community·Vladimir Vovk·18 days ago
#bYOiDhLL
#monorepo#hono#react#rpc#fullscreen#enter
Reading 0:00
15s threshold

Hono RPC is a built-in feature of the Hono web framework that enables end‑to‑end type safety between your backend API and frontend client by automatically sharing and synchronising API specifications—without any code generation. Let's see how we can create a monorepo with Hono API and a React app. Monorepo First, we need to create a folder for our new monorepo. mkdir hono-rpc-and-react-monorepo cd hono-rpc-and-react-monorepo Enter fullscreen mode Exit fullscreen mode Check that we have the latest pnpm installed. npm i -g pnpm@latest Enter fullscreen mode Exit fullscreen mode Init new project. pnpm init Enter fullscreen mode Exit fullscreen mode Add the pnpm-workspace.yaml workspace configuration file. packages : - ' api' - ' web' Enter fullscreen mode Exit fullscreen mode Hono Now we can create an empty Hono project. pnpm create hono@latest api Enter fullscreen mode Exit fullscreen mode We need to update the api/package.json .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More