Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anytv/anytv-node-cors
https://github.com/anytv/anytv-node-cors
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anytv/anytv-node-cors
- Owner: anyTV
- License: mit
- Created: 2015-01-20T23:15:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T01:21:21.000Z (almost 7 years ago)
- Last Synced: 2024-12-15T15:40:15.775Z (26 days ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 16
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anytv-node-cors
[![Build Status](https://travis-ci.org/anyTV/anytv-node-cors.svg?branch=master)](https://travis-ci.org/anyTV/anytv-node-cors)
[![Coverage Status](https://coveralls.io/repos/anyTV/anytv-node-cors/badge.svg?branch=master&service=github)](https://coveralls.io/github/anyTV/anytv-node-cors?branch=master)
[![Dependencies](https://david-dm.org/anyTV/anytv-node-cors.svg)](https://david-dm.org/anyTV/anytv-node-cors)
[![npm version](https://badge.fury.io/js/anytv-node-cors.svg)](https://badge.fury.io/js/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 the middleware.
```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)