How to get data from differnt port in Ember-cli

how to get data from differnt port in Ember-cli.suppose i am running my ember-cli in 4200, and i need to data from 8080…any one can help me out.

I had to setup cors for this. It was a huge pain in the butt. I added the cors origin and resource headers to my api. Then in my ember app

  crossDomain: true
    withCredentials: true

Specify the host with port (eg, localhost:8080) in your adapter:

If its in development, just set up proxy for your other server (say Rails or Django or w/e you are using).

This proxy will then catch API requests and send them to backend, returning responses back while remaining transparent to both sides…

1 Like