Chained routes — RPC · Hono

Make the cats API's routes part of its type by chaining them on the Hono instance, export that type, and watch a client built from nothing but the type call every route with autocompletion.

What you will learn

Read the theory for Chained routes

All RPC lessons

All Hono courses

loading types…

What you'll learn

  • Chain routes on the Hono instance so typeof app carries every path, method, input and response
  • Export AppType and build a typed client from it with hc(), sharing nothing but the type
  • Read the error a client shows when the app it was built from was not chained