Skip to content

borderless/fetch-cors

Repository files navigation

Fetch CORS

NPM version NPM downloads Build status Test coverage

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