1.0.2 • Published 9 years ago
kelTool v1.0.2
App-Store
Global Dependencies to Install
npm install
npm install nodemon -g
npm install mocha -g##Usage
Start Server Without Debug mode:
nodemon
Response:
[nodemon] 1.9.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node src/server.js`Start Server With Debug mode:
DEBUG=true nodemon src/server.js
Response:
--------------
App has been updated: {"id":"26"}
--------------
200
--------------
--------------
POST/apps/26{"id":"26"}
--------------
200
--------------Root Page
route /api/#CRUD for App
Create App
POST - /api/appsResponse
{
"id": 28,
"title": "Best routes Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-10T03:17:50.000Z"
"updatedAt": "2016-06-10T03:17:50.000Z",
"createdAt": "2016-06-10T03:17:50.000Z"
}Get all Apps
GET - /api/apps/Get an App
GET - /api/apps/28Response
{
"id": 28,
"userId": 2,
"title": "Best routes Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-10T03:17:50.000Z"
"updatedAt": "2016-06-10T03:17:50.000Z",
"createdAt": "2016-06-10T03:17:50.000Z"
}Update App
POST - /api/apps/28Response
{
"title": "Best routes Ever",
"description": "A fast paced side scrolling shooter",
"releaseDate": "2016-06-10T03:17:50.000Z"
"updatedAt": "2016-06-10T03:17:50.000Z",
"createdAt": "2016-06-10T03:17:50.000Z"
}Delete App
DELETE - /api/apps/28Response
1 - means app was deleted
0 - means there was no app to delete#CRUD for users
##Create a User
POST - /api/users##Response:
{
"id": 17,
"name": "kelsey",
"updatedAt": "2016-06-10T03:29:57.000Z",
"createdAt": "2016-06-10T03:29:57.000Z"
}One User
GET -
/api/users/3##Response:
{
"id": 3,
"name": "kelsey",
"createdAt": "2016-06-08T21:23:55.000Z",
"updatedAt": "2016-06-08T21:23:55.000Z",
"apps": []
}Get all users
GET - /api/users/##Response:
[
{
"id": 3,
"name": "kelsey",
"createdAt": "2016-06-08T21:23:55.000Z",
"updatedAt": "2016-06-08T21:23:55.000Z"
},
{
"id": 4,
"name": "kelsey",
"createdAt": "2016-06-08T21:24:12.000Z",
"updatedAt": "2016-06-08T21:24:12.000Z"
},
{
"id": 5,
"name": "kelsey",
"createdAt": "2016-06-09T15:52:25.000Z",
"updatedAt": "2016-06-09T15:52:25.000Z"
}
]Update User
POST - /api/users/3##Response:
{
"id": 3,
"name": "kelsey",
"createdAt": "2016-06-08T21:23:55.000Z",
"updatedAt": "2016-06-08T21:23:55.000Z"
}DELETE User
DELETE - /api/users/1Response
1 - means app was deleted
0 - means there was no app to delete