0.0.1 • Published 5 years ago

@zcorky/koa-cors v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

koa-cors

NPM version Coverage Status Dependencies Build Status license issues

helmet for Koa, wrapper with helmet.

Install

$ npm install @zcorky/koa-cors

Usage

// See more in test
import cors from '@zcorky/koa-cors';

import * as Koa from 'koa';
const app = new Koa();

app.use(cors());

app.use(ctx => {
  ctx.body = 'Hello, World!';
});

app.listen(8000, '0.0.0.0', () => {
  console.log('koa server start at port: 8000');
});

Related