Quantcast
Viewing all articles
Browse latest Browse all 4826

Ember mirage: 'cannot read property 'get' of undefined'?

@GregWeb wrote:

I have an existing app and tried to get mirage working with it.

export default function () {
this.namespace = '/api/v0';   
  this.timing = 2000;  
  this.get('/accounts', function () {
    console.log("yoooooooooo");
    return{
      users: [
        { id: '1', email: 'joe@myapp.io' },
        { id: '2', email: 'mark@myapp.io' },
      ]
    };
  });

  this.post('/api/login', function(req, res) {
    res.send({
      id: '1',
      token: 'token',
      email: req.body.email,
      isAdmin: true
    })
  }

In Chrome inspector the console log is outputted, but I get errors:

What is this “raven” error? and what is the undefined error trying to tell me?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles