Next.js
Create three route handlers. These exports work with the App Router in Next.js 13 through 16.
export { GET } from '@scelar/nodepod/next';export { GET_PREVIEW_BRIDGE as GET } from '@scelar/nodepod/next';export { GET_PREVIEW_BRIDGE_SCRIPT as GET } from '@scelar/nodepod/next';If the project already has proxy.ts in Next.js 16 or middleware.ts in an earlier version, compose nodepodProxy or nodepodMiddleware with the existing handler. The helpers return null when a request does not belong to Nodepod, so your own routing can continue.
Use nodepodMatchers when exporting a matcher configuration that covers all three assets.
The runtime itself still belongs in a client boundary because it requires browser APIs:
'use client';
import { Nodepod } from '@scelar/nodepod';See Preview deployment for isolation headers and production preview origins.