1.0.0 • Published 5 years ago
@borderless/fetch-cors v1.0.0
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
1.0.0
5 years ago