Final HTTP 404 responder for fetch, e.g. Cloudflare Workers.
npm install @borderless/fetch-final-handler --saveimport { compose } from "throwback";
import { finalHandler } from "@borderless/fetch-final-handler";
const app = compose([get(), post()]);
const req = new Request("/");
app(req, finalHandler());This project is written using TypeScript and publishes the definitions directly to NPM.
MIT