A simple restaurant menu app using RESTful web application and the Python framework Flask along with implementing third-party OAuth authentication using various HTTP methods and implementing CRUD (create, read, update and delete) operations.
download Git from git-scm.com. Install the version for your operating system.
VirtualBox is the software that actually runs the VM. You can download it from virtualbox.org, here. Install the platform package for your operating system. You do not need the extension pack or the SDK. You do not need to launch VirtualBox after installing it.
Vagrant is the software that configures the VM and lets you share files between your host computer and the VM's filesystem. You can download it from vagrantup.com. Install the version for your operating system.
Windows: Use the Git Bash program (installed with Git) to get a Unix-style terminal.
Other systems: Use your favorite terminal program.
From the terminal, run:
git clone https://github.com/indranarayan12/item-catalog item-catalog
Using the terminal, change directory to oauth (cd item-catalog), then type vagrant up to launch your virtual machine.
Once it is up and running, type vagrant ssh. This will log your terminal into the virtual machine, and you'll get a Linux shell prompt. When you want to log out, type exit at the shell prompt. To turn the virtual machine off (without deleting anything), type vagrant halt. If you do this, you'll need to run vagrant up again before you can log into it.
Now that you have Vagrant up and running type vagrant ssh to log into your VM. change to the /vagrant directory by typing cd /vagrant. This will take you to the shared folder between your virtual machine and host machine.
Type ls to ensure that you are inside the directory that contains project.py, database_setup.py, and two directories named 'templates' and 'static'
Now type python database_setup.py to initialize the database.
Type python lotsofmenus.py to populate the database with restaurants and menu items.
Type python project.py to run the Flask web server. In your browser visit http://localhost:5000 to view the restaurant menu app. You should be able to view, add, edit, and delete menu items and restaurants.
For viewing the JSON end points type the url followed by /JSON which displays the same information as served by HTML end points.