samedi 10 octobre 2015

Ember app served from express urls don't work after refresh

In ember I build for production into the /client folder in my express app. In express at the bottom just before I start the app I have these lines

var api = require('./app/routes/api');

app.use('/api/v'+apiVersion, api);
app.use(express.static(__dirname + '/client'));

That works up until I refresh the page at which point it returns a Cannot GET for that route, in my logs from morgan in the terminal I see it's making a call to /url_here instead of routing to the index.html file and allowing ember to take over from there. Do I need to set this up a different way?

Aucun commentaire:

Enregistrer un commentaire