anytv-node-cors
Version:
Express CORS middleware
61 lines (38 loc) • 1.21 kB
Markdown
# anytv-node-cors
[](https://travis-ci.org/anyTV/anytv-node-cors)
[](https://coveralls.io/github/anyTV/anytv-node-cors?branch=master)
[](https://david-dm.org/anyTV/anytv-node-cors)
Our CORS middleware for expressjs. Especially made for our awesome expressjs [boilerplate](https://github.com/anyTV/anytv-node-boilerplate).
# Install
```sh
npm install anytv-node-cors --save
```
# Usage
### Setting the middlware
On your index.js / server.js / app.js, register your database using a key.
```javascript
import cors from 'anytv-node-cors';
import express from 'express';
app = express();
app.use(cors(config));
```
# Contributing
Install the tools needed:
```sh
npm install mocha -g
npm install --dev
```
# Running test
```sh
npm test
npm test-dev #to --watch
```
# Code coverage
```sh
npm run coverage
```
Then open coverage/lcov-report/index.html.
# License
MIT
# Author
[Freedom! Labs, any.TV Limited DBA Freedom!](https://www.freedom.tm)