@@ -20,19 +20,24 @@ The API provides HTTP methods via AJAX requests to collect, insert and update th
2020## Routes
2121
2222| URL | Collection | Method | Parameters | Response | Action |
23- | ------ | ------ | ------ | ------ | ------ | ------ |
24- | https://rest-api-node.herokuapp.com/list/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database |
25- | https://rest-api-node.herokuapp.com/create/project | projects | post | JSON | JSON | Add JSON into the database |
26- | https://rest-api-node.herokuapp.com/update/project/:id | projects | put | id, JSON | Update the document with sent JSON data |
27- | https://rest-api-node.herokuapp.com/select/project/:id | projects | get | id | JSON | Return the document, related to the sent id |
28- | https://rest-api-node.herokuapp.com/delete/project/:id | projects | delete | id | status 200 | Delete the document, related to the sent id |
29-
23+ | ------ | ------ | ------ | ------ | ------ | ------ |
24+ | https://rest-api-node.herokuapp.com/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database |
25+ | https://rest-api-node.herokuapp.com/projects/create | projects | post | JSON | JSON | Add JSON into the database |
26+ | https://rest-api-node.herokuapp.com/projects/update/:id | projects | put | id, JSON | Update the document with sent JSON data |
27+ | https://rest-api-node.herokuapp.com/projects/select/:id | projects | get | id | JSON | Return the document, related to the sent id |
28+ | https://rest-api-node.herokuapp.com/projects/delete/:id | projects | delete | id | status 200 | Delete the document, related to the sent id |
29+ | https://rest-api-node.herokuapp.com/users | users | get | Nothing | JSON with Array | Get a list of users in the database |
30+ | https://rest-api-node.herokuapp.com/users/create | users | post | JSON | JSON | Add JSON into the database |
31+ | https://rest-api-node.herokuapp.com/users/update/:id | users | put | id, JSON | Update the document with sent JSON data |
32+ | https://rest-api-node.herokuapp.com/users/select/:id | users | get | id | JSON | Return the document, related to the sent id |
33+ | https://rest-api-node.herokuapp.com/users/delete/:id | users | delete | id | status 200 | Delete the document, related to the sent id |
34+
3035## Collections
3136
3237#### Schema Project (projects)
3338
3439| Name | Description | Type |
35- | ------ | ------ | ------ |
40+ | ------ | ------ | ------ |
3641| project | project name | String |
3742| technologies | project technologies | String |
3843| description | project description | String |
@@ -43,25 +48,35 @@ The API provides HTTP methods via AJAX requests to collect, insert and update th
4348| project | project name | String |
4449| status | project status (Development / Production) | String |
4550
51+ #### Schema User (users)
52+
53+ | Name | Description | Type |
54+ | ------ | ------ | ------ |
55+ | username | user name | String |
56+ | password | user password (hash) | String |
57+ | email | user mail | String |
58+ | photo | user photo | String |
59+ | nickname | user nickname | String |
60+
4661## API
4762
4863| Technology | Description | Link |
4964| ------ | ------ | ------ |
5065| Heroku | Cloud Platform | [ heroku.com] |
5166| Heroku mLab Dyno | MongoDB database server | [ mlab.com] |
5267| GitHub | Version Controlling | [ github.com] |
53- | Nodemon | server reload, automatically | [ nodemon .com] |
68+ | PM2 | server reload, automatically | [ pm2 .com] |
5469
5570## API Directories
5671
57- - Routes ``` ./app /routes ```
58- - Models ``` ./app /models ```
59- - API ``` ./app/api ```
72+ - Routes ``` ./src /routes ```
73+ - Models ``` ./src /models ```
74+ - Actions ``` ./src/actions ```
6075- Configurations of Express ``` ./config/express.js ```
6176- Database configurations ``` ./config/database.js ```
6277- Server configurations ``` ./server.js ```
6378
64- ## Configuring the API locally
79+ ## Configuring the API locally
6580
6681- Download or clone the project access the project folder with the terminal and execute the CLI <code >npm install</code >.
6782- Run the server <code >npm start</code > (Nodemon)
@@ -73,11 +88,11 @@ The API provides HTTP methods via AJAX requests to collect, insert and update th
7388- Dependency body-parser - <a href =" https://www.npmjs.com/package/body-parser " >https://www.npmjs.com/package/body-parser </a >
7489- Dependency cors - <a href =" https://www.npmjs.com/package/cors " >https://www.npmjs.com/package/cors </a >
7590- Dependency express-load - <a href =" https://www.npmjs.com/package/express-load " >https://www.npmjs.com/package/express-load </a >
76- - Dependency Nodemon - <a href =" https://nodemon.io/ " >https://nodemon.io/ </a >
91+ - Dependency Nodemon - <a href =" https://nodemon.io/ " >https://nodemon.io/ </a >
7792
7893By: <a href =" http://renanlopes.com " >Renan Lopes</a >
7994
8095[ heroku.com ] : < https://www.heroku.com >
8196[ mlab.com ] : < https://mlab.com >
8297[ github.com ] : < https://www.github.com >
83- [ nodemon .com] : < https ://nodemon .io/>
98+ [ pm2 .com] : < http ://pm2.keymetrics .io/>
0 commit comments