Hi,
I’m new to ember and I can’t seem to get mirage passthrough to work. I’m sure it’s something really basic that I’m missing.
I have created a simple ember app at GitHub - robwatkin/mirg: Ember mirage to highlight my problem and raised an issue at Passthrough hangs · Issue #449 · miragejs/ember-cli-mirage · GitHub which I’ll paste below.
Any help or comments at all would be really appreciated as I’ve been totally stuck on this for a couple of days.
Thanks Rob
Issue #449
I have created a very simple ember app with http-mock for one simple GET endpoint. I can get mirage to return data from a handler in config.js
mirage/config.js
this.get('/api/foofs', function() {
return {
'foofs': [
{ id: 1, name: 'foo a'},
{ id: 2, name: 'foo b'},
{ id: 3, name: 'foo c'}
]
};
However, when I replace this with a passthrough
this.passthrough('/api/foofs');
ember just seems to hang, browser is empty and console says:
DEBUG: -------------------------------
DEBUG: Ember : 1.13.11
DEBUG: Ember Data : 1.13.15
DEBUG: jQuery : 1.11.3
DEBUG: -------------------------------
XHR finished loading: GET "http://localhost:4200/api/foofs".