Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qedproxy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qedproxy

Serve static pages, JSON, or proxy requests to another endpoint. Makes front-end development simpler.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

QEDproxy

When developing front-end apps, you need an API. But that API might not support CORS. That means you have to write your own proxy and serve your app from the same server as your proxy.

QEDproxy can serve your client-side app and let you proxy requests to a remote endpoint.

Directory listing is supported, and index.html is a default filename.

Example

You're writing a cool app that shows who's in space right now.

The api http://api.open-notify.org/astros.json is a fantastic resource but it's not available locally.

QEDProxy to the rescue.

Put your app in the public folder.

Then run qedproxy and pass it the public folder where your pages are, and the root of the remote URL's endpoint, like this:

$ qedproxy --static public --api http://api.open-notify.org

A server starts on port 4242.

A request to /api on your local server maps to / on the remote server, which should work in most cases.

Additional options

Need to change the port?

$ qedproxy --static public --api http://api.open-notify.org --port 9999

You can use -s, -a and -p if those extra keystrokes bug you. They are optional, too. If you don't specify an endpoint, then this'll just be a static webserver. If you don't specify a static folder, it'll use public/. And the port defaults to 4242.

-v will show you the current version and exit.

CORS

CORS headers are set up to be wide-open. So you don't have to use this as a static server if you don't want to. Fire this up on some port and hit it from wherever. Should work great.

Install

QEDproxy can be used as a global CLI program:

$ npm install -g qedproxy

It's also something you could install per project.

$ npm install qedproxy --save-dev

Although this will be placed in node_modules instead so you should start it appropriately.

Tests

Tests are written with Mocha and Should.js. To run them, run

$ npm test

Contributing

Contributions are welcome.

Fork, write a single feature or single bugfix with passing tests. Make a pull request **that justifies why this feature should exist((, but please don't touch the REAMDE file or bump the version.

New features without justification will be closed automatically.

License

MIT

See LICENSE for details.

FAQs

Package last updated on 08 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc