How to bypass mirage?


#1

I have written a small application which makes use of mirage to simulate api calls. Everything works fine but I would like to now call the “real” api service I have and not the stub created with mirage.

What I did is add the host to JSONAPIAdapter (mine can be found in \adapters\application.js) to point to my api service. However when I run the application I get the error message “Mirage: Your Ember app tried to GET…”. This looks like ember is still trying to get the data through mirage instead of my API service.

How can I bypass mirage and call my API implementation?


#2

hey, check here http://www.ember-cli-mirage.com/docs/v0.1.x/server-configuration/#environment-options you need to turn of mirage in environment.js or you van set only some endpoints to bypass with passthrough http://www.ember-cli-mirage.com/docs/v0.1.x/server-configuration/#passthrough


#3

What we do is to use the --proxy argument when running ember serve, to proxy our real API and run the the app against it. Mirage will turn itself off when it’s seeing the --proxy argument.