JSONProxy

by afeld

GitHub Readme.md

JSONProxy Build Status

Simple HTTP proxy that enables cross-domain requests to any JSON API. See https://jsonp.afeld.me for documentation. See the releases page for the client library changelog.

Setup

Simple

See package.json for compatible Node versions.

npm install
npm start

and do requests to http://localhost:8000/?url=.... For live reloading:

npm install -g nodemon
export $(cat .env | xargs) && nodemon

External services

The following service integrations can be enabled with the corresponding environment variables:

  • Keen.io: set KEEN_PROJECT_ID and KEEN_WRITE_KEY

Deploy

Deployment

This app is deployed to AWS with the Serverless Framework. To deploy, run

sls create_domain
sls deploy

If you use the client library with your own JSONP deployment, override the proxy URL before calling $.jsonp().

$.jsonp.PROXY = 'https://mydomain.com/proxy/path/';

See also