Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 1.69 KB

README.md

File metadata and controls

78 lines (53 loc) · 1.69 KB

NO MORE CORS IN DEV

CircleCI

How to use

Download or clone the repo:

git clone https://github.com/danielnaranjo/no-more-cors-in-dev

Install it and run:

cd no-more-cors-in-dev  
npm i 
npm run dev

Under the hood

micro
micro-fork
micro-cors
node-fetch

Usage

Micro use port 3000 by default but worry, Micro fix it ;)

GET http://127.0.0.1:3000/api?url=https://example.com/app/v1/information
POST http://127.0.0.1:3000/api HTTP/1.1
Content-Type: application/json

{
    "url": "https://example.com/app/v1/doLogin",
    "data" : {
        "email": "demo@gmail.com",
        "password" : "123456"
    }
}
OPTIONS http://127.0.0.1:3000/api HTTP/1.1
PUT
PATCH
DELETE

Deploy it to the cloud with now (download)

now

The idea behind the example

Every day I work with Angular or React in Frontend and I have to deal with CORS policy, configuration, etc. I tired to do it, So, this service fix all this crap, this script make a request to this service passing to data... No more configuration, testing, etc.

Easy plug-and-play!

Feel free to say Hello!

Twitter: @naranjodaniel or buy a coffee

Licence

MIT