An example of how to create a publishable and fully type-safe API using Hono.
A RPC client is exposed and can be published as a package to be consumed by other applications.
api– a Cloudflare Worker that exposes a RPC clientapp– a Remix app that consumes the API
pnpm install -rRun commands project-wide with pnpm run <command>.
dev– start the development serversbuild– build the production bundleslint– lint the codebasetest– run the tests
pnpm run devYou should see an output containing:
api:dev: ⬣ Listening at http://0.0.0.0:8787app:dev: Remix App Server started at http://localhost:3000Find the app URL in the output and open it in your browser.
You can make changes in any of the projects and the development servers will automatically reload ✨