Research RESTful API Express Framework
License and Copyright Notice
By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).
What is the goal or the problem, and why is it important?
-Since our module is starting from scratch, we need to understand how to utilize a framework and which in our case we will use Express. This will be the foundation for API's in our module so it important we know what we are doing. Implementing this framework will ensure that the application will be able to interact with the backend of the program. Since View Order will need to able to get specific information about the placed orders, having a framework will be able display the correct information.
How are you going to achieve the goal or solve the problem?
-Find resources on understanding and utilizing Express.
What will be produced as a result of this effort and where will it live on GitLab?
-A list of resources on how to utilize Express
Give justification of weight or due date.
This issue is given a weight of 4, which is equivalent to 1-person week. Researching and coming up with a list of resources for this topic should be easy since it is a very common tool.
Who will do it, and what will they do?
-@JohnTesta will complete this issue and summarize their findings of Express and how to utilize in the project.
What was the outcome?
Express is a minimalist web framework for Node that will be able to provide the necessary features for our ViewOrder’s API. To install express, follow these instructions: https://expressjs.com/en/starter/installing.html. (Note: Node.js must already be installed).
-This video is good for learning how to use Express/Node.js to set up API endpoints: https://www.youtube.com/watch?v=pKd0Rpw7O48
-Example of GET request using express:
app.get(‘/‘, function (req, res) { res.send(‘Hello world!’) })
-This is the format we will use to set up all the endpoints that we need
-Need to set up the API to listen to a port Example:
app.listen(3000, function () { console.log(‘Example app listening on port 3000!) })
-Will also need to connect to the database using MongoDB
-Setting up the API for ViewOrder’s backend using express is the first step after this issue in order to move forward
-Coming up with specific endpoints will be discussed with the team in the future and is out of the scope of this issue