anywhere-door
node package for simulate cors origin server in your localhost
Last updated 3 months ago by freeweed .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install anywhere-door 
SYNC missed versions from official npm registry.

Anywhere Door

This package use for provide The simulator server for allow cors site

Install

To use this package you need to install it global

npm install anywhere-door -g

Usage

Use as server

door --open

you can also use --port to specific port default is 3000, now use can go anywhere you want by pass query string url.

Example

$.post(`http://localhost:3000?url=my-cors-site.com`, {
    "data": {......}
})

door will send request with method, body, header that just same as you send to door, and send response back to you just same what the cors site server send back to door.

Use cli

door [--options]

Avaliable options

--url // require eg. "www.google.com"
--method // require eg. "get"
--header // require eg. "{Content-type: 'Application/Json'}"
--body // require eg. "{foo: 'bar'}"

Current Tags

  • 1.0.0                                ...           latest (3 months ago)

1 Versions

  • 1.0.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |