Node API is production ready and open source project in Node, Express and MongoDB
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
URL | Collection | Method | Parameters | Response | Action |
---|---|---|---|---|---|
https://rest-api-node.herokuapp.com/projects | projects | get | Nothing | JSON with Array | Get a list of projects in the database |
https://rest-api-node.herokuapp.com/projects/create | projects | post | JSON | JSON | Add JSON into the database |
https://rest-api-node.herokuapp.com/projects/update/:id | projects | put | id, JSON | Update the document with sent JSON data | |
https://rest-api-node.herokuapp.com/projects/select/:id | projects | get | id | JSON | Return the document, related to the sent id |
https://rest-api-node.herokuapp.com/projects/delete/:id | projects | delete | id | status 200 | Delete the document, related to the sent id |
URL | Collection | Method | Parameters | Response | Action |
---|---|---|---|---|---|
https://rest-api-node.herokuapp.com/users | users | get | Nothing | JSON with Array | Get a list of users in the database |
https://rest-api-node.herokuapp.com/users/create | users | post | JSON | JSON | Add JSON into the database |
https://rest-api-node.herokuapp.com/users/update/:id | users | put | id | JSON | Update the document with sent JSON data |
https://rest-api-node.herokuapp.com/users/select/:id | users | get | id | JSON | Return the document, related to the sent id |
https://rest-api-node.herokuapp.com/users/delete/:id | users | delete | id | status 200 | Delete the document, related to the sent id |
Name | Description | Type |
---|---|---|
project | project name | String |
technologies | project technologies | String |
description | project description | String |
demoLink | demo link | String |
githubLink | GitHub link | String |
author | author's name | String |
authorLink | links to author (website, linkedin) | String |
project | project name | String |
status | project status (Development / Production) | String |
Name | Description | Type |
---|---|---|
username | user name | String |
password | user password (hash) | String |
user mail | String | |
photo | user photo | String |
nickname | user nickname | String |
Technology | Description | Link |
---|---|---|
Heroku | Cloud Platform | heroku.com |
Heroku mLab Dyno | MongoDB database server | mlab.com |
GitHub | Version Controlling | github.com |
PM2 | server reload, automatically | pm2.com |
- Routes
./src/routes
- Models
./src/models
- Actions
./src/actions
- Services
./src/services
- Configurations of Express
./config/express.js
- Database configurations
./config/database.js
- Server configurations
./server.js
- Download or clone the project access the project folder with the terminal and execute the CLI
npm install
- Config your database in
./congig/database.js
changemongoose.connect('mongodb://localhost/yourDatabaseName');
- Run the server in development mode
npm run dev
Ctrl + c
to exit of logs and runpm2 kill
to kill all process of pm2- Access in your browser http://localhost:3000/projects
- Dependency express - https://www.npmjs.com/package/express
- Dependency body-parser - https://www.npmjs.com/package/body-parser
- Dependency cors - https://www.npmjs.com/package/cors
- Dependency consign - https://www.npmjs.com/package/consign
- Dependency PM2 - http://pm2.keymetrics.io/
- Dependency mongoose - https://www.npmjs.com/package/mongoose
By: Renan Lopes