0

I've created some ember g http-mocks, and they live in my ember app under /server.

I'd also like to be able to run my ember cli app, proxying all api requests to localhost:3000.

It seems if /server exists, ember will use it, regardless of the -proxy flag. I found some discussion about a --no-http-mocks flag near the end of this issue, but I don't think there's a formal proposal yet.

Is there any hackish intermediate way to get ember cli to ignore /server, other than by deleting the entire /server directory?

Sam Selikoff
  • 12,366
  • 13
  • 58
  • 104
  • I guess you could just `mv app/server app/server-disabled` and then create/delete a symbolic link to it. – givanse Dec 21 '14 at 17:36

1 Answers1

2

You could probably set up ember-cli to enable/disable http-mock based on an environments.js variable as described here: http://discuss.emberjs.com/t/how-to-disable-http-mock-server-within-environment-config-file/6660

Then to manually flip http-mock on and off as you like, pass in a process environment variable when you run your ember serve at command line. Seems like the way to do that is in this SO post: How to pass API keys in environment variables to Ember CLI using process.env?

Community
  • 1
  • 1
benzo
  • 160
  • 1
  • 6