Ember Data Mirage
Automatically create Mirage models based on the app's Ember Data models
Features
- Automatically create mirage models based off of your ember data models
- Models will include the appropriate relationships and associations
- Easily build on top of the pre created models
Installation
ember install ember-data-mirage
Helpful Links
- ### Changelog
Looking for help?
If it is a bug please open an issue on GitHub.
Usage
Register the Models
In your mirage/config.js
add the following two line to the top:
; { // Register Models ; // Everything else goes here thisurlPrefix = ''; // make this `http://localhost:8080`, for example, if your API is on a different server thisnamespace = '/api'; // make this `/api`, for example, if your API is namespaced thistiming = 300; // delay for each request, automatically set to 0 during testing}
Extending a Model
You can extend a pre created model via the following syntax
// mirage/models/foo.js ; 'foo';