Item Catalog
A web application that provides a list of items and their information within a variety of categories and integrates third party user registration and authentication. Also includes a JSON API endpoint.
Usage
Requirements
Using the Udacity Vagrant VM and the virtualenv
provided in the repo will cover all requirements/dependencies. Including:
- Virtualenv
- Flask (0.12.1)
- Flask-HTTPAuth (3.2.2)
- Flask-Login (0.4.0)
- Flask-SQLAlchemy (2.2)
- SQLAlchemy (1.1.9)
- httplib2 (0.10.3)
- Jinja2 (2.8)
- oauth2client (4.0.0)
- oauthlib (1.0.3)
- requests-oauthlib (0.8.0)
- Werkzeug (0.12.1)
Setup external APIs
- Set up a new Google project here.
- Set up Oauth2 under the google API manager.
- Copy the
CLIENT_ID
and CLIENT_SECRET
into config.py
Setup virtualenv
- Ensure virtualenv is installed - guide
- Add virtualenv folder for application:
$ virtualenv env
- Activate virtualenv
$ source env/bin/activate
- Import requirements
$ env/bin/pip3 install -r requirements.txt
Run Item Catalog App
- Navigate to
udacity-fsnd-item-catalog/app
- Run with
$ env/bin/python3 run.py
- Server will run at
localhost:5000
- Optional - populate database with test data:
env/bin/python3 db_seed.py
Udacity Vagrant VM
Allows for easy usage with same system configuration used during development:
- Ensure Vagrant, Virtual Box and Python are installed on your machine.
- Clone the Udacity fullstack-nanodegree-vm
-
Clone or download this repo into the
/vagrant
directory
- Launch the VM:
- SSH into the VM:
- On Mac/Linux
vagrant$ vagrant ssh
- Gives SSH connection details on windows
- Windows use Putty or similar SSH client
- In the VM navigate to the
/vagrant/udacity-fsnd-item-catalog
directory:
$ cd /vagrant/udacity-fsnd-item-catalog
- Usage is the same as in the Usage section