jeudi 23 avril 2015

ember-cli (version 0.1.15) heroku express server error

I'm making an ajax request

$.getJSON('/beers')

and what I'm getting back in the response (in heroku environment) is the HTML for my index page. It's very weird since in my server/index.js file I do have the API defined and it works locally even when running:

ember server --environment=production

server/index.js

app.get("/beers", function (req,res) {
        res.json(data.beers)
    })

Any ideas what can be causing this error?




Aucun commentaire:

Enregistrer un commentaire