Skip to content

raginwombat/UdacityFSND-itemCatalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 	=======================
|	Item Catalog Web App		|
 	========================
 	-----------------------------------
|   Project 3 subumission by R. Nelson	|
 	-----------------------------------

 # Overview
-----------------------------------------------------
This is a web app that allows a user to display a catalog of items grouped by category. Once logged in the can edit, create and delete categories and items.


# Documentation
--------------------------------

To interact with the app open a web broser and go to localhost:5000/
Pages:
	* localhost:5000/ or localhost:5000/catalog main site
	* localhost:5000/catalog/json JSON dump of the catalog and items
	* localhost:5000/catalog/xml XML dump of the catalog



# Installation
--------------------------------
This library requires SQLite, Python 2.7 and Flask >=0.9 installed locally. THe libraries can be installed using the apt-get command or by using the UDacity Nano Degree VM available from http://github.com/udacity/full.

## Setting Up 0Auth2
---------------------------
To host this app a Google+ 0Auth2 client secret must be created. Follow the instruction in https://auth0.com/docs/connections/social/google to generate a web application 0Auth2 client secret.

An important note is when creating the secret the Authorized Javscript Origins must be on the IP addrss or website that is hosting the app with port 5000 authorized.
Ex:
	To run locally the Authorized javascript origins should contain http://localhost:5000, http://127.0.0.1:5000, http://0.0.0.0:5000

After creating download the resulting client_secrets.json place it in the root directory with this itemCatalog.py.

You must also replace the data-clientid string in the ./templates/login.html file with the client ID that was created and is in the client_secret.json file.

## Setting Up the Enviroment 
---------------------------
To setup the application you'll need to have Python, Flask and SQLAlchemy install on the server.
Navigate to the directory with the scrpts in it and run the followign commands:
	
	* Set Up up the database for the app
		' $ python database_set.py '

	* This step is optional, but highly recommended if you'd like to preload the app with data prior to use.
		' $ testCatalog.py  '

	* Run the application
		' $ python  itemCatalog.py '

Sucessfull completion of the setup and launching of the app will result in the comandline displaying the following:

 * ' Running on http://0.0.0.0:5000/ '
 * ' Restarting with reloader '

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published