@borderless/fetch-cors
v1.0.0
Published
CORS middleware for fetch-based routers
Downloads
4
Maintainers
Readme
Fetch CORS
CORS middleware for fetch-based router.
Installation
npm install @borderless/fetch-cors --save
Usage
import { compose } from "throwback";
import { cors } from "@borderless/fetch-cors";
import { get } from "@borderless/fetch-router";
const app = compose([cors(), get("/test", () => new Response("hello world"))]);
TypeScript
This project is written using TypeScript and publishes the definitions directly to NPM.
License
MIT