Remove ember-cli-mirage from ember

I use ember-cli-mirage to submit requests. Since I have rails api to serve this request, how do I remove or remove ember-cli-mirage from my ember?

If I delete the mirage folder, I get a build error!

+5
source share
2 answers

You should leave Mirage installed (and a folder on disk), but shut down the server whenever you want to use your actual backend API. This will allow using Mirage in a selective environment, for example, during testing.

By default, Mirage is disabled in production as well as in development when using the -proxy option.

To disable Mirage explicitly, you can set the enabled config parameter to false . For example, to always disable in development:

 // config/environment.js ... if (environment === 'development') { ENV['ember-cli-mirage'] = { enabled: false }; } 
+8
source

Leave mirage installed if you want to use your backend api, just start ember with

  ember s --proxy http://localhost:8000 

if api is running on your computer on port 8000.

Additional information on the official site of the mirage: http://www.ember-cli-mirage.com/docs/v0.3.x/configuration/#enabled

+3
source

All Articles