Public
fiberplaneHonoZodStarter
Example Hono-Zod-OpenAPI app with a Fiberplane API explorer.
For an example with regular-old Hono, see: https://www.val.town/v/fiberplane/fiberplaneHonoStarter
- Import
@fiberplane/hono
- Expose your OpenAPI spec
app.doc("/doc", {
openapi: "3.0.0",
info: {
title: "User Management API",
version: "v1.0.0",
},
});
- Mount the api explorer
This will mount it at the root /*
, but you can mount it to another route, like /fp/*
if you
are using /
for your main app. We recommend /
if your Hono app is an API without a frontend.
- Visit your Val's root route to play with the API explorer!
createFiberplane
mounts Fiberpalne at the root route (/
), which can be used to explore the api's routes and make requests.
Think of it like an embedded, lightweight postman.