Skip to content

serveSW

Nodepod API


Nodepod API / src/integrations/server / serveSW

serveSW(_req?): Promise<Response>

Defined in: src/integrations/server.ts:39

Fetch-API handler. The caller is responsible for only routing the SW path here, so we don’t bother looking at the request.

Request

Promise<Response>

// Hono
app.get('/__sw__.js', () => serveSW())
// Next.js app/__sw__.js/route.ts
export async function GET() { return serveSW() }