In this project, I develop an application that provides a list of items within a variety of categories as well as provide a user registration and authentication system. Registered users will have the ability to post, edit and delete their own items.
Here is the steps to run the program:
- You should first install Vagrant and VirtualBox.
- Under the root directory of the project, type in
vagrant upto start and provision the vagrant environment.
- Type in the command
vagrant sshto connect to the virtual machine via SSH.
- In the VM command line, type in
cd /vagrant/catalogto enter the project diretcory on the VM.
- Make sure that there is no database file named catalog.db in the folder. You can delete it by
rm -f catalog.dbif it exists.
python database_setup.pyto set up a database.
python database_init.pyto create some initialzed data in the database.
python app.pyto start the server.
- Go to http://localhost:8000/catalog/ from your favorite browser on the local machine to play with the application.
You won't be able to post, edit and delete catagories and items until you log in with Google+ account.
To stop the VM, following these steps:
- Type in
exitin VM command line to exit the virtual machine.
vagrant haltto stop the vagrant machine.