Skip to content

danielnaranjo/no-more-cors-in-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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": "[email protected]",
        "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

About

No more f**king CORS in a development environment!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published