How to use http-mocks?


#1

Hi,

I created several http-mocks. If I want to use the generated mock-api in my ember application I start my server with:

ember serve --proxy http://localhost:4200/api

With this everything works fine until an error while the usage of the app occurs. Then the socket hangs up. Is this a normal behaviour or is there a fix for this?

Second question

I found the following at http://www.ember-cli.com/: “The next time you run ember serve, your new mock server will be listening for any API requests from your Ember app.”

Does that mean that I don’t have to set a proxy?


#2

Hey,

You don’t need to proxy it. just ember server.

You do need to add namespace ‘api’ to your adapter.

Tal.