Frameworks

Nuxt

Mount the Clivly tick route as a Nuxt server API route.

The docs work better when framework-specific scaffolding is on its own route instead of being buried in one huge page.

Every framework wraps the same createClivlyHandler(), and every route resolves to the same public URL: /api/clivly/tick. In Nuxt, clivly init scaffolds a server route at server/api/clivly/tick.ts.

SvelteKit, Remix, and Nuxt are all scaffolded by clivly init — each mounts the same handler behind its own router's export shape.

Nuxt

server/api/clivly/tick.ts
import { toWebRequest } from "h3";
import clivly from "../../../clivly.config";

const handler = clivly.createClivlyHandler();

export default defineEventHandler((event) => handler(toWebRequest(event)));

Allow the tunnel host during local development

Nuxt serves through Vite, so it rejects any Host header it does not recognise with a 403 — before the request reaches your tick route. Tunnelled sync (clivly dev) fails until the tunnel domain is allowed:

nuxt.config.ts
export default defineNuxtConfig({
vite: {
  // Only needed for tunnelled local development.
  server: { allowedHosts: [".trycloudflare.com"] },
},
});

Without it the dashboard reports "The host app returned 403", naming Clivly rather than Vite. clivly dev prints this line for you.