Last active
June 12, 2016 03:26
-
-
Save nsipplswezey/f6a50b92fadeeb4cbcf740d3120308e3 to your computer and use it in GitHub Desktop.
Nodal TL:DR Template
This file contains hidden or 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
npm install -g nodal | |
nodal new <my-awesome-project> | |
cd <my-awesome-project> | |
nodal g:model <Awesome_Model> <user_id:int body:string json_field:json> | |
nodal g:controller --for <Awesome-Models> | |
nodal db:create | |
nodal db:prepare | |
nodal db:migrate | |
nodal s |
This file contains hidden or 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
// <comment/with/filepath.js> |
This file contains hidden or 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
// <comment/with/filepath.js> |
This file contains hidden or 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
Request: | |
POST to /endpoint | |
user_id : 1 | |
body : Hello Nodal TL;DR | |
json_field : {"awesome":"true","magic":["Better","than","magic!"],"power":"9999"} | |
Response: | |
{ | |
"meta": { | |
"total": 1, | |
"count": 1, | |
"offset": 0, | |
"error": null | |
}, | |
"data": [ | |
{ | |
"id": 6, | |
"user_id": 1, | |
"tasks": { | |
"magic": [ | |
"Better", | |
"than", | |
"magic!" | |
], | |
"power": "9999", | |
"awesome": "true" | |
}, | |
"done": true, | |
"created_at": "2016-06-02T11:37:24.728Z", | |
"updated_at": "2016-06-02T11:37:24.735Z" | |
} | |
] | |
} | |
POST to /endpoint | |
{ | |
"meta": { | |
"total": 1, | |
"count": 1, | |
"offset": 0, | |
"error": null | |
}, | |
"data": [ | |
{ | |
"id": 1, | |
"user_id": 1, | |
"tasks": { | |
"magic": [ | |
"Better", | |
"than", | |
"magic!" | |
], | |
"power": "9999", | |
"awesome": "true" | |
}, | |
"done": true, | |
"created_at": "2016-06-02T11:37:24.728Z", | |
"updated_at": "2016-06-02T11:37:24.735Z" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment