Skip to main content
This release is 1 version behind 0.23.0 — the latest version of @http/host-deno-deploy. Jump to latest

Built and signed on GitHub Actions

Hosting on Deno Deploy, for production/staging deployments.

This package works with Deno
This package works with Deno
JSR Score
94%
Published
3 months ago (0.21.0)
Package root>init.ts
import { withFallback } from "jsr:/@http/route@^0.21.0/with-fallback"; import { intercept } from "jsr:/@http/interceptor@^0.21.0/intercept"; import { logging } from "jsr:/@http/interceptor@^0.21.0/logger"; import type { Awaitable, Interceptors } from "jsr:/@http/interceptor@^0.21.0/types"; /** * Convenience function to generate Deno.serve init parameter for Deno Deploy. */ export default function initDeploy( handler: ( req: Request, info: Deno.ServeHandlerInfo, ) => Awaitable<Response | null>, ...interceptors: Interceptors<unknown[], Response>[] ): Deno.ServeInit & (Deno.ServeOptions | Deno.ServeTlsOptions) { return { handler: intercept(withFallback(handler), logging(), ...interceptors), }; }