This is my first article that I will be bringing for you guys related to the development of applications based on Node.js, Express and MongoDB. The article consists of building a REST API application, its description and the use good programming practices.
Toolkit: MongoDB | Express.js | Node.js
Obs.: The following instructions were tested on Ubuntu distribution.
- After 'git clone' command, run the following commands to install dependencies:
- user@user:~/path_to_cloned_folder/myFolder$ npm install
- Manually install the dependencies that may have not been installed by the above command. ✅
- Start MongoDB
- user@user:~/shell$ mongod
- Start application
- use@user:~/path_to_cloned_folder/myFolder npm start
- Access the browser http://localhost:4000/api/item
Action | Required | Method | URL |
---|---|---|---|
List all items | GET |
/api/item | |
Search for a item with a specific ID | GET |
/api/item/:id | |
Search for a item with a specifit NAME | GET |
/api/item/:name | |
Create a new item | POST |
/api/item | |
Update the item with ID | PUT |
/api/item/:id | |
Remove item with ID | DELETE |
/api/item/:id |
- Thiago Luiz Pereira Nunes (ThiagoLuizNunes) [email protected]
This project is licensed under the MIT License - see the LICENSE.md file for details
Created By ThiagoLuizNunes 2017.