Nuxt
Mount the vs3 request handler in Nuxt 3 with Nitro and H3.
vs3 provides a dedicated H3/Nuxt helper via vs3/integrations/h3.
Nuxt 3 (Nitro) can mount your Web handler with toH3Handler.
Basic Setup
server/api/storage/[...all].ts
import { toH3Handler } from "vs3/integrations/h3";
import { storage } from "../../storage";
export default toH3Handler(storage.handler);This mounts the vs3 API at /api/storage/**.
Why This Works
storage.handler is a standard Web Request -> Response handler. toH3Handler uses H3's fromWebHandler to bridge that handler into Nitro's event system.
Client Usage
Nuxt apps can use the Vue client from vs3/vue and keep types synced with typeof storage.$Infer.
lib/storage-client.ts
import { createStorageClient } from "vs3/vue";
import type { storage } from "~/server/storage";
export const storageClient = createStorageClient<typeof storage.$Infer>({});Warning
Use a type-only import for storage so server code is not bundled into client output.
Next Steps
- createStorage for server setup.
- Client overview for upload/download APIs.
- Next.js integration for App Router setup.