Why am I connecting to the wrong host

I have a web server on my machine that I want my application to connect to through the RestAdapter. I have set up an appropriate model and I created an extension of the RestAdapter in a file called application.js and placed it in the app/adapter folder

The code in application.js is:

import DS from ‘ember-data’;

export default DS.RestAdapter.extend({ host: ‘http://localhost:8080/’, namespace: ‘api’ });

When I run the application, I get the a 404 error when the GET is attempted. It appears I’m trying to connect to http://localhost:4200/defect....instead of http://localhost:8080/api/

What am I doing wrong?

Did you mean app/adapters (plural)

I rechecked the spelling of the adapters folder, it was spelled adaptors :confused: When I changed it to adapters, everything ran correctly.

It happens, glad I could help.