samedi 18 juin 2016

Ember isn't looking for my API

So I'm running an Ember-CLI and Rails 5 API-only app. It works fine in development when I use the --proxy http://localhost:3000 flag, but now I am trying to deploy to Heroku.

I have two sides: recipme-ember and recipme-rails. Feel free to explore the repos:

amclelland/fancy_recipme_frontend

and

amclelland/fancy_recipme

So after some struggling I have both sides deployed, but the Ember app refuses to talk to the Rails app. When I try to go to the Meal index I see this in the heroku logs:

"GET /meals HTTP/1.1" 200 711 "http://ift.tt/1UprhHY" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"

Looks like the Ember app is trying to get the /meals data from itself. I have set API_URL env var for my Ember app to the Rails heroku URL. Not sure if there's something else I need to set.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire