-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"predef": [ | ||
"server", | ||
"document", | ||
"window", | ||
"-Promise" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
export default function() { | ||
|
||
// These comments are here to help you get started. Feel free to delete them. | ||
|
||
/* | ||
Config (with defaults). | ||
Note: these only affect routes defined *after* them! | ||
*/ | ||
|
||
// this.urlPrefix = ''; // make this `http://localhost:8080`, for example, if your API is on a different server | ||
// this.namespace = ''; // make this `/api`, for example, if your API is namespaced | ||
// this.timing = 400; // delay for each request, automatically set to 0 during testing | ||
|
||
/* | ||
Shorthand cheatsheet: | ||
this.get('/posts'); | ||
this.post('/posts'); | ||
this.get('/posts/:id'); | ||
this.put('/posts/:id'); // or this.patch | ||
this.del('/posts/:id'); | ||
http://www.ember-cli-mirage.com/docs/v0.3.x/shorthands/ | ||
*/ | ||
this.namespace = '/api'; | ||
this.get('/studies/:id', function() { | ||
return { | ||
'data': { | ||
id: '12345', | ||
type: 'study', | ||
attributes: { | ||
'name': 'Title of my study', | ||
'duration': '20 minutes' | ||
} | ||
} | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function(/* server */) { | ||
|
||
/* | ||
Seed your development database using your factories. | ||
This data will not be loaded in your tests. | ||
Make sure to define a factory for each model you want to create. | ||
*/ | ||
|
||
// server.createList('post', 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { JSONAPISerializer } from 'ember-cli-mirage'; | ||
|
||
export default JSONAPISerializer.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"predef": [ | ||
"server", | ||
"document", | ||
"window", | ||
"location", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters