stefanpenner/ember-app-kit — pull request #304 by FilmKnurd (2013-11-14 19:08:01+00:00)
Title: Adds ability to stub or proxy API requests (Proposal)

**This is a proposal for discussion**

@samheuck and I worked out an example for handle API routes during development (#237 and #286). Our idea, is that you can either stub the API locally, or proxy API requests to another server (using the snippet provided by @ianpetzer). Please review and tell me what you think.

**Benefits:**
* Stub out a local API so that it is possible to use the REST adapter with fixture data
* Ability to choose a local API or to proxy to a remote API

**Configuration**
tasks/options/express-server.js

Specify the method: 'stub' or 'proxy'
Specify the proxy URL if method is set to 'proxy'

**Stub Usage**
The stub method loads express routes from the api-stub/routes.js file. It utilizes express-namespace and body parser.

See the README.md file for setting up an example with Ember Data.

**Proxy Usage**
All requests to /api/* will be pass through to URL configured in the task options for the server.