|
1 | | - |
2 | | - |
3 | | -## Api Rest Node |
4 | | - |
5 | | -Api desenvolvida em NodeJS, Express e MongoDB para teste de aplicações Front End. |
6 | | - |
7 | | -### Descrição |
8 | | - |
9 | | -Motivo do desenvolvimento da API é disponibilizar a desenvolvedores Front End um servidor e banco de dados configurado para testes de conexão e de visualização dos dados agilizando o processo de desenvolvimento a API fornece via requisições AJAX métodos http para coletar, inserir e alterar dados. |
10 | | - |
11 | | -### Showcase |
12 | | - |
13 | | -| Aplicação | Código (GitHub) | |
14 | | -| ------ | ------ | |
15 | | -|https://typescript-angular4.herokuapp.com/ | https://github.com/renanlopescoder/typescript-angular4 | |
16 | | - |
17 | | -## Rotas |
18 | | - |
19 | | -| url | collection | método | parâmetros | retorno | ação | |
20 | | -| ------ | ------ | ------ | ------ | ------ | ------ | |
21 | | -| https://rest-api-node.herokuapp.com/list/projects | projects | get | Não Possui | JSON com Array | Pega lista de projetos no banco | |
22 | | -| https://rest-api-node.herokuapp.com/create/project | projects | post | JSON | JSON | adiciona JSON ao banco | |
23 | | -| https://rest-api-node.herokuapp.com/update/project/:id | projects | put | id, JSON | atualiza o documento com dados do JSON enviado | |
24 | | -| https://rest-api-node.herokuapp.com/select/project/:id | projects | get | id | JSON | retorna o documento com id enviado | |
25 | | -| https://rest-api-node.herokuapp.com/delete/project/:id | projects | delete | id | status 200 | Apaga o documento com id enviado | |
26 | | - |
27 | | -## Collections |
28 | | - |
29 | | -#### Schema Project (projects) |
30 | | - |
31 | | -| nome | descrição | type | |
32 | | -| ------ | ------ | ------ | |
33 | | -| project | nome do projeto | String | |
34 | | -| technologies | tecnologias do projeto | String | |
35 | | -| description | descrição do projeto | String | |
36 | | -| demoLink | link de demonstração | String | |
37 | | -| githubLink | link GitHub | String | |
38 | | -| author | nome do autor | String | |
39 | | -| authorLink | link do autor (website, linkedin) | String | |
40 | | -| project | nome do projeto | String | |
41 | | -| status | status do projeto (Desenvolvimento / Produção) | String | |
42 | | - |
43 | | -## API |
44 | | - |
45 | | -| Tecnologia | Descrição | Link | |
46 | | -| ------ | ------ | ------ | |
47 | | -| Heroku | Cloud Platform | [heroku.com] | |
48 | | -| Heroku mLab Dyno | Servidor do Banco de Dados MongoDB | [mlab.com] | |
49 | | -| GitHub | Versionamento | [github.com] | |
50 | | -| Nodemon | server reload, automatically | [nodemon.com] | |
51 | | - |
52 | | -## Diretórios da API |
53 | | - |
54 | | -- Rotas ```./app/routes``` |
55 | | -- Modelos ```./app/models``` |
56 | | -- Api ```./app/api``` |
57 | | -- Configuração do Express ```./config/express.js``` |
58 | | -- Configuração Database ```./config/database.js``` |
59 | | -- Servidor ```./server.js``` |
60 | | - |
61 | | -## Configurando a API localmente |
62 | | - |
63 | | -- Download or clone the project access the project folder with the terminal and execute the CLI <code>npm install</code>. |
64 | | -- Run the server <code>npm start</code> (Nodemon) |
65 | | -- Access in your browser <a href="http://localhost:3000">http://localhost:3000</a> |
66 | | - |
67 | | -## Dependencias da API |
68 | | - |
69 | | -- Dependency express - <a href="https://www.npmjs.com/package/express">https://www.npmjs.com/package/express</a> |
70 | | -- Dependency body-parser - <a href="https://www.npmjs.com/package/body-parser">https://www.npmjs.com/package/body-parser</a> |
71 | | -- Dependency cors - <a href="https://www.npmjs.com/package/cors">https://www.npmjs.com/package/cors</a> |
72 | | -- Dependency express-load - <a href="https://www.npmjs.com/package/express-load">https://www.npmjs.com/package/express-load</a> |
73 | | -- Dependency Nodemon - <a href="https://nodemon.io/">https://nodemon.io/</a> |
74 | | - |
75 | | -By: <a href="http://renanlopes.com">Renan Lopes</a> |
76 | | - |
77 | | -[heroku.com]: <https://www.heroku.com> |
78 | | -[mlab.com]: <https://mlab.com> |
79 | | -[github.com]: <https://www.github.com> |
80 | | -[nodemon.com]: <https://nodemon.io/> |
| 1 | + |
| 2 | + |
| 3 | +## Rest API Node |
| 4 | + |
| 5 | +Api developed in NodeJS, Express and MongoDB for test of application Front End. |
| 6 | + |
| 7 | +### Description |
| 8 | + |
| 9 | +This API is developed to provide Front End developers with a server and database configurations for connection testing and to provide a visualization of the data streamlining for the development process. |
| 10 | +The API provides HTTP methods via AJAX requests to collect, insert and update the given data. |
| 11 | + |
| 12 | +### Showcase |
| 13 | + |
| 14 | +| Application | Code (GitHub) | |
| 15 | +| ------ | ------ | |
| 16 | +|https://typescript-angular4.herokuapp.com/ | https://github.com/renanlopescoder/typescript-angular4 | |
| 17 | + |
| 18 | +## Routes |
| 19 | + |
| 20 | +| URL | Collection | Method | Parameters | Response | Action | |
| 21 | +| ------ | ------ | ------ | ------ | ------ | ------ | |
| 22 | +| https://rest-api-node.herokuapp.com/list/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database | |
| 23 | +| https://rest-api-node.herokuapp.com/create/project | projects | post | JSON | JSON | Add JSON into the database | |
| 24 | +| https://rest-api-node.herokuapp.com/update/project/:id | projects | put | id, JSON | Update the document with sent JSON data | |
| 25 | +| https://rest-api-node.herokuapp.com/select/project/:id | projects | get | id | JSON | Return the document, related to the sent id | |
| 26 | +| https://rest-api-node.herokuapp.com/delete/project/:id | projects | delete | id | status 200 | Delete the document, related to the sent id | |
| 27 | + |
| 28 | +## Collections |
| 29 | + |
| 30 | +#### Schema Project (projects) |
| 31 | + |
| 32 | +| Name | Description | Type | |
| 33 | +| ------ | ------ | ------ | |
| 34 | +| project | project name | String | |
| 35 | +| technologies | project technologies | String | |
| 36 | +| description | project description | String | |
| 37 | +| demoLink | demo link | String | |
| 38 | +| githubLink | GitHub link | String | |
| 39 | +| author | author's name | String | |
| 40 | +| authorLink | links to author (website, linkedin) | String | |
| 41 | +| project | project name | String | |
| 42 | +| status | project status (Development / Production) | String | |
| 43 | + |
| 44 | +## API |
| 45 | + |
| 46 | +| Technology | Description | Link | |
| 47 | +| ------ | ------ | ------ | |
| 48 | +| Heroku | Cloud Platform | [heroku.com] | |
| 49 | +| Heroku mLab Dyno | MongoDB database server | [mlab.com] | |
| 50 | +| GitHub | Version Controlling | [github.com] | |
| 51 | +| Nodemon | server reload, automatically | [nodemon.com] | |
| 52 | + |
| 53 | +## API Directories |
| 54 | + |
| 55 | +- Routes ```./app/routes``` |
| 56 | +- Models ```./app/models``` |
| 57 | +- API ```./app/api``` |
| 58 | +- Configurations of Express ```./config/express.js``` |
| 59 | +- Database configurations ```./config/database.js``` |
| 60 | +- Server configurations ```./server.js``` |
| 61 | + |
| 62 | +## Configuring the API locally |
| 63 | + |
| 64 | +- Download or clone the project access the project folder with the terminal and execute the CLI <code>npm install</code>. |
| 65 | +- Run the server <code>npm start</code> (Nodemon) |
| 66 | +- Access in your browser <a href="http://localhost:3000">http://localhost:3000</a> |
| 67 | + |
| 68 | +## API Dependencies |
| 69 | + |
| 70 | +- Dependency express - <a href="https://www.npmjs.com/package/express">https://www.npmjs.com/package/express</a> |
| 71 | +- Dependency body-parser - <a href="https://www.npmjs.com/package/body-parser">https://www.npmjs.com/package/body-parser</a> |
| 72 | +- Dependency cors - <a href="https://www.npmjs.com/package/cors">https://www.npmjs.com/package/cors</a> |
| 73 | +- Dependency express-load - <a href="https://www.npmjs.com/package/express-load">https://www.npmjs.com/package/express-load</a> |
| 74 | +- Dependency Nodemon - <a href="https://nodemon.io/">https://nodemon.io/</a> |
| 75 | + |
| 76 | +By: <a href="http://renanlopes.com">Renan Lopes</a> |
| 77 | + |
| 78 | +[heroku.com]: <https://www.heroku.com> |
| 79 | +[mlab.com]: <https://mlab.com> |
| 80 | +[github.com]: <https://www.github.com> |
| 81 | +[nodemon.com]: <https://nodemon.io/> |
0 commit comments