- NodeJS /w npm
- MySQL
- Gulp - (globally)
- nodemon - (globally)
npm install
DB_NAME=apiCRUD
DB_USER=
DB_PASS=
DB_HOST=localhost
DB_SCHEMA=mysql
DB_PORT=3306
PORT = 3000
NODE_DEBUG=DEV
gulp startup
or
nodemon src/server.js
DEBUG=true gulp startup
or
DEBUG=true nodemon src/server.js
const util = require('path/to/lib/util');
// How to use util
util.debug(title, obj, status);
- Create a User
- Display User based upon id
- Display all Users
- Update User based upon id
- Delete User based upon id
- Create an App
- Display App based upon id
- Display all App from specific userId
- Display all Apps
- Update User based upon id
- Update App UserId
- Create artassets
- Display all artassets upon app id
- Display one artassets from specific app id and artassetid
- Update artassets based upon id
--=-=-=-=-=-=-=-=-
/api/users/
{
"name": "Kevin",
}
/api/users/1
{
"id": 1,
"name": "Kevin Tucker",
"createdAt": "2016-06-08T01:11:52.000Z",
"updatedAt": "2016-06-08T01:11:52.000Z"
}
/api/users/
[
{
"id": 1,
"name": "Kevin",
"createdAt": "2016-06-08T01:35:43.000Z",
"updatedAt": "2016-06-08T01:35:43.000Z"
},
{
"id": 2,
"name": "Kevin",
"createdAt": "2016-06-08T01:35:47.000Z",
"updatedAt": "2016-06-08T01:35:47.000Z"
},
{
"id": 3,
"name": "Kevin",
"createdAt": "2016-06-08T01:35:48.000Z",
"updatedAt": "2016-06-08T01:35:48.000Z"
}
]
/api/users/1
{
"name": "Kevin T"
}
/api/users/1
1
-=-=-=-=-=-=-=-=-
/api/apps
{
"title": "Best routes Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z"
}
/api/apps/1
{
"id": 1,
"title": "Best routes Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"createdAt": "2016-06-08T01:12:36.000Z",
"updatedAt": "2016-06-08T01:12:36.000Z",
"userId": 1,
"artAssets": [
{
"id": 1,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:16:11.000Z",
"updatedAt": "2016-06-08T01:16:11.000Z",
"appId": 1
}
]
}
/api/users/1/apps
[
{
"id": 1,
"title": "Best routes Ever Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"createdAt": "2016-06-08T01:35:54.000Z",
"updatedAt": "2016-06-08T01:44:12.000Z",
"userId": 1,
"artAssets": [
{
"id": 1,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:16.000Z",
"updatedAt": "2016-06-08T01:36:16.000Z",
"appId": 1
},
{
"id": 2,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:20.000Z",
"updatedAt": "2016-06-08T01:36:20.000Z",
"appId": 1
},
{
"id": 3,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:25.000Z",
"updatedAt": "2016-06-08T01:36:25.000Z",
"appId": 1
}
]
}
]
/api/apps/
[
{
"id": 1,
"title": "Best routessdfsdfsdfr Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"createdAt": "2016-06-08T01:35:54.000Z",
"updatedAt": "2016-06-08T01:35:54.000Z",
"userId": null
},
{
"id": 2,
"title": "Best routessdfsdfsdfr Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"createdAt": "2016-06-08T01:35:55.000Z",
"updatedAt": "2016-06-08T01:35:55.000Z",
"userId": null
}
]
/api/apps/1
{
"title": "Best routes Ever Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"userId": 1
}
/api/apps/1
{
"title": "Best routes Ever Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-15T22:29:20.000Z",
"userId": 2
}
/api/apps/1/artassets/
{
"title": "Best router Ever",
"srcLink": "Kevin",
"appId": 1
}
/api/apps/1/artassets/
[
{
"id": 1,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:16.000Z",
"updatedAt": "2016-06-08T02:33:50.000Z",
"appId": 1
},
{
"id": 2,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:20.000Z",
"updatedAt": "2016-06-08T01:36:20.000Z",
"appId": 1
}
]
/api/apps/1/artassets/2
{
"id": 2,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:20.000Z",
"updatedAt": "2016-06-08T01:36:20.000Z",
"appId": 1
}
/api/apps/1/artassets/2
{
"id": 2,
"title": "Best router Ever",
"srcLink": "Kevin",
"createdAt": "2016-06-08T01:36:20.000Z",
"updatedAt": "2016-06-08T01:36:20.000Z",
"appId": 2
}