cors-expressjs
Cors middleware for Express framework
Class based middleware for CORS support for APIs. Based on article HTTP access control (CORS)
Installation
Install Cors as an npm module and save it to your package.json file as a dependency:
npm install --save cors-expressjs
Basic Usage
To start using this middleware you need to create an instance of Cors class. Then you can use middleWare method. Here is example:
'use strict'; const express = ; const Cors = ; const app = ; const cors = ; app; app; app;
That's it. Very simple :)
Tests
npm test