Skip to content

Commit 3c1739f

Browse files
mend
1 parent 1062bc2 commit 3c1739f

File tree

2 files changed

+62
-65
lines changed

2 files changed

+62
-65
lines changed

README.md

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,99 @@
1-
2-
![NodeJS logo](logo.png)
1+
![NodeJS logo](logo.png)
32

43
## Node API
54

65
### Description
6+
77
Node API is production ready and open source project in Node, Express and MongoDB
88

99
### Support
10+
1011
This application is hosted on Heroku and serve a bunch of AJAX requests to give and manipulate data from database and give a support to test front end applications
1112

1213
### Servers
1314

14-
| Server | Description | Api Url | Branch (GitHub) |
15-
| ------ | ------ | ------ | ------ |
16-
| staging | Open Api | https://rest-api-node.herokuapp.com | master
17-
| production | Authenticated Api | https://rest-api-node-production.herokuapp.com | production
15+
| Server | Description | Api Url | Branch (GitHub) |
16+
| ---------- | ----------------- | ---------------------------------------------- | --------------- |
17+
| staging | Open Api | https://rest-api-node.herokuapp.com | master |
18+
| production | Authenticated Api | https://rest-api-node-production.herokuapp.com | production |
1819

1920
### Showcase
2021

21-
| Application | Code (GitHub) | Server
22-
| ------ | ------ | ------ |
23-
| https://typescript-angular4.herokuapp.com/ | https://github.com/renanlopescoder/typescript-angular4 | staging
24-
| http://mobx-react.herokuapp.com/ | https://github.com/renanlopescoder/mobx-react | staging
25-
22+
| Application | Code (GitHub) | Server |
23+
| ------------------------------------------ | ------------------------------------------------------ | ------- |
24+
| https://typescript-angular4.herokuapp.com/ | https://github.com/renanlopescoder/typescript-angular4 | staging |
25+
| http://mobx-react.herokuapp.com/ | https://github.com/renanlopescoder/mobx-react | staging |
2626

2727
## Routes
2828

2929
#### Projects
30-
| URL | Collection | Method | Parameters | Response | Action |
31-
| ------ | ------ | ------ | ------ | ------ | ------ |
32-
| https://rest-api-node.herokuapp.com/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database |
33-
| https://rest-api-node.herokuapp.com/projects/create | projects | post | JSON | JSON | Add JSON into the database |
34-
| https://rest-api-node.herokuapp.com/projects/update/:id | projects | put | id, JSON | Update the document with sent JSON data |
35-
| https://rest-api-node.herokuapp.com/projects/select/:id | projects | get | id | JSON | Return the document, related to the sent id |
36-
| https://rest-api-node.herokuapp.com/projects/delete/:id | projects | delete | id | status 200 | Delete the document, related to the sent id |
30+
31+
| URL | Collection | Method | Parameters | Response | Action |
32+
| ------------------------------------------------------- | ---------- | ------ | ---------- | --------------------------------------- | ------------------------------------------- |
33+
| https://rest-api-node.herokuapp.com/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database |
34+
| https://rest-api-node.herokuapp.com/projects/create | projects | post | JSON | JSON | Add JSON into the database |
35+
| https://rest-api-node.herokuapp.com/projects/update/:id | projects | put | id, JSON | Update the document with sent JSON data |
36+
| https://rest-api-node.herokuapp.com/projects/select/:id | projects | get | id | JSON | Return the document, related to the sent id |
37+
| https://rest-api-node.herokuapp.com/projects/delete/:id | projects | delete | id | status 200 | Delete the document, related to the sent id |
3738

3839
#### Users
39-
| URL | Collection | Method | Parameters | Response | Action |
40-
| ------ | ------ | ------ | ------ | ------ | ------ |
41-
| https://rest-api-node.herokuapp.com/users | users | get | Nothing | JSON with Array | Get a list of users in the database |
42-
| https://rest-api-node.herokuapp.com/users/create | users | post | JSON | JSON | Add JSON into the database |
43-
| https://rest-api-node.herokuapp.com/users/update/:id | users | put | id | JSON | Update the document with sent JSON data |
44-
| https://rest-api-node.herokuapp.com/users/select/:id | users | get | id | JSON | Return the document, related to the sent id |
45-
| https://rest-api-node.herokuapp.com/users/delete/:id | users | delete | id | status 200 | Delete the document, related to the sent id |
40+
41+
| URL | Collection | Method | Parameters | Response | Action |
42+
| ---------------------------------------------------- | ---------- | ------ | ---------- | --------------- | ------------------------------------------- |
43+
| https://rest-api-node.herokuapp.com/users | users | get | Nothing | JSON with Array | Get a list of users in the database |
44+
| https://rest-api-node.herokuapp.com/users/create | users | post | JSON | JSON | Add JSON into the database |
45+
| https://rest-api-node.herokuapp.com/users/update/:id | users | put | id | JSON | Update the document with sent JSON data |
46+
| https://rest-api-node.herokuapp.com/users/select/:id | users | get | id | JSON | Return the document, related to the sent id |
47+
| https://rest-api-node.herokuapp.com/users/delete/:id | users | delete | id | status 200 | Delete the document, related to the sent id |
4648

4749
## Collections
4850

4951
#### Schema Project (projects)
5052

51-
| Name | Description | Type |
52-
| ------ | ------ | ------ |
53-
| project | project name | String |
54-
| technologies | project technologies | String |
55-
| description | project description | String |
56-
| demoLink | demo link | String |
57-
| githubLink | GitHub link | String |
58-
| author | author's name | String |
59-
| authorLink | links to author (website, linkedin) | String |
60-
| project | project name | String |
61-
| status | project status (Development / Production) | String |
53+
| Name | Description | Type |
54+
| ------------ | ----------------------------------------- | ------ |
55+
| project | project name | String |
56+
| technologies | project technologies | String |
57+
| description | project description | String |
58+
| demoLink | demo link | String |
59+
| githubLink | GitHub link | String |
60+
| author | author's name | String |
61+
| authorLink | links to author (website, linkedin) | String |
62+
| project | project name | String |
63+
| status | project status (Development / Production) | String |
6264

6365
#### Schema User (users)
6466

65-
| Name | Description | Type |
66-
| ------ | ------ | ------ |
67-
| username | user name | String |
67+
| Name | Description | Type |
68+
| -------- | -------------------- | ------ |
69+
| username | user name | String |
6870
| password | user password (hash) | String |
69-
| email | user mail | String |
70-
| photo | user photo | String |
71-
| nickname | user nickname | String |
71+
| email | user mail | String |
72+
| photo | user photo | String |
73+
| nickname | user nickname | String |
7274

7375
## API
7476

75-
| Technology | Description | Link |
76-
| ------ | ------ | ------ |
77-
| Heroku | Cloud Platform | [heroku.com] |
78-
| Heroku mLab Dyno | MongoDB database server | [mlab.com] |
79-
| GitHub | Version Controlling | [github.com] |
80-
| PM2 | server reload, automatically | [pm2.com] |
77+
| Technology | Description | Link |
78+
| ---------------- | ----------------------- | ------------ |
79+
| Heroku | Cloud Platform | [heroku.com] |
80+
| Heroku mLab Dyno | MongoDB database server | [mlab.com] |
81+
| GitHub | Version Controlling | [github.com] |
8182

8283
## API Directories
8384

84-
- Routes ```./src/routes```
85-
- Models ```./src/models```
86-
- Actions ```./src/actions```
87-
- Services ```./src/services```
88-
- Configurations of Express ```./config/express.js```
89-
- Database configurations ```./config/database.js```
90-
- Server configurations ```./server.js```
85+
- Routes `./src/routes`
86+
- Models `./src/app/Models`
87+
- Controllers `./src/app/Controllers`
88+
- Services `./src/app/Services`
89+
- Config consign and express `./src/config/express.js`
90+
- Server configuration and application startup `./server.js`
9191

9292
## Configuring the API locally
9393

9494
- Download or clone the project access the project folder with the terminal and execute the CLI <code>npm install</code>
95-
- Config your database in ```./congig/database.js``` change ```mongoose.connect('mongodb://localhost/yourDatabaseName');```
96-
- Run the server in development mode <code>npm run dev</code>
97-
- <code>Ctrl + c</code> to exit of logs and run <code>pm2 kill</code> to kill all process of pm2
95+
- To change database change on constants the databaseUrl
96+
- Run the server <code>npm start</code>
9897
- Access in your browser <a href="http://localhost:3000/projects">http://localhost:3000/projects</a>
9998

10099
## API Dependencies
@@ -103,12 +102,10 @@ This application is hosted on Heroku and serve a bunch of AJAX requests to give
103102
- Dependency body-parser - <a href="https://www.npmjs.com/package/body-parser">https://www.npmjs.com/package/body-parser</a>
104103
- Dependency cors - <a href="https://www.npmjs.com/package/cors">https://www.npmjs.com/package/cors</a>
105104
- Dependency consign - <a href="https://www.npmjs.com/package/consign">https://www.npmjs.com/package/consign</a>
106-
- Dependency PM2 - <a href="http://pm2.keymetrics.io/">http://pm2.keymetrics.io/</a>
107105
- Dependency mongoose - <a href="https://www.npmjs.com/package/mongoose">https://www.npmjs.com/package/mongoose</a>
108106

109107
By: <a href="http://renanlopes.com">Renan Lopes</a>
110108

111-
[heroku.com]: <https://www.heroku.com>
112-
[mlab.com]: <https://mlab.com>
113-
[github.com]: <https://www.github.com>
114-
[pm2.com]: <http://pm2.keymetrics.io/>
109+
[heroku.com]: https://www.heroku.com
110+
[mlab.com]: https://mlab.com
111+
[github.com]: https://www.github.com

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "node_api",
3-
"version": "2.1.0",
4-
"description": "Node API is production ready and open source project in Node, Express, MongoDB and PM2",
3+
"version": "3.0.0",
4+
"description": "Node API is production ready and open source project in Node, Express, MongoDB",
55
"scripts": {
66
"start": "node server.js"
77
},

0 commit comments

Comments
 (0)