From 51ee55b62630438b2f0f3fb8282c92d1ce883302 Mon Sep 17 00:00:00 2001 From: Vic Boudolf Date: Thu, 23 Feb 2017 10:45:29 -0500 Subject: [PATCH] add code that can be uncommented to toggle from using the stubbed API to a real API update readme --- README.md | 13 +++++++++++++ app/adapters/application.js | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index dd9e856..14f6096 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,19 @@ Make use of the many generators for code, try `ember help generate` for more det * `ember build` (development) * `ember build --environment production` (production) +### To Run Against the Elixir/Phoenix API in the Blog Post + +Change `app/adapters/application.js` to this: +``` +// export { default } from 'ember-data-fixture-adapter'; +import JSONAPIAdapter from 'ember-data/adapters/json-api'; + +export default JSONAPIAdapter.extend({ +}); +``` +* Start the Elixir Phoenix app on port 4000 +* `ember server --proxy http://localhost:4000` + ### Deploying Specify what it takes to deploy your app. diff --git a/app/adapters/application.js b/app/adapters/application.js index 1b43302..c28710d 100755 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -1 +1,7 @@ +// comment out the next line to make the app access the elixir REST API export { default } from 'ember-data-fixture-adapter'; + +// uncomment the next lines to make the app access the elixir REST API +// import JSONAPIAdapter from 'ember-data/adapters/json-api'; +// export default JSONAPIAdapter.extend({ +// });