Small Project for Full Stack Application using Python Flask Framework and Relational Database
Here are the steps to demo the small application
- execute database_setup.py to create the database with 'Restaurant' and 'MenuItem' Table
- execute lotsofmenus.py to insert something into the tables
a. Web browsing
a1. execute project.py to load up the server on your localhost a2. open up your browser and type in the address localhost:5678/ to start using the application
b. RESTful API
b1. execute endPoints.py to load up the server on your localhost b2. use cURL/POSTMAN to send corresponding request
GET
- List of restaurants : hostname/restaurants/
- Menu in a specific restaurant : hostname/restaurants/<r_id>/menu
- Specific menu : hostname/menu/<m_id>
POST
- To modify the name of a specific restaurant : hostname/restaurants?id=<r_id>&name=<new_name>
- To add a new item into a specific restaurant : hostname/restaurants/<r_id>/menu?name=<new_name>&description=<>&price=<>&course=<> (# name if mandatory for adding / other features are optional)
- To edit a specific menu : hostname/menu/<m_id>/?name=<new_name>&description=<>&price=<>&course=<>
DELETE
- Specific Menu: hostname/menu/<m_id>/