Skip to content

Commit 6496a85

Browse files
committed
Add mirage addon generated files
1 parent dac71b1 commit 6496a85

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

mirage/config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export default function() {
2+
3+
// These comments are here to help you get started. Feel free to delete them.
4+
5+
/*
6+
Config (with defaults).
7+
8+
Note: these only affect routes defined *after* them!
9+
*/
10+
11+
// this.urlPrefix = ''; // make this `http://localhost:8080`, for example, if your API is on a different server
12+
// this.namespace = ''; // make this `api`, for example, if your API is namespaced
13+
// this.timing = 400; // delay for each request, automatically set to 0 during testing
14+
15+
/*
16+
Shorthand cheatsheet:
17+
18+
this.get('/posts');
19+
this.post('/posts');
20+
this.get('/posts/:id');
21+
this.put('/posts/:id'); // or this.patch
22+
this.del('/posts/:id');
23+
24+
http://www.ember-cli-mirage.com/docs/v0.2.x/shorthands/
25+
*/
26+
}

mirage/scenarios/default.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default function(/* server */) {
2+
3+
/*
4+
Seed your development database using your factories.
5+
This data will not be loaded in your tests.
6+
7+
Make sure to define a factory for each model you want to create.
8+
*/
9+
10+
// server.createList('post', 10);
11+
}

mirage/serializers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { JSONAPISerializer } from 'ember-cli-mirage';
2+
3+
export default JSONAPISerializer.extend({
4+
});

0 commit comments

Comments
 (0)