This app provides a way for the user to create an account and then save and categorize links that they find on the web.
At this stage of dvelopment that user can
- create an account
- create public and private links
- view all public links (and toggle between) viewing "just public", "just private" or both public and private links
- create, delete, and update categories
An instance of this app has been deployed to Heroku and can be seen here:
provide categorical filtering provide an API so that front end frameworks and Vanilla JavaScript can take advantage of this data.
There is a many to many relationship between links and categories. To bootstrap the data you can run these scripts in this order.
- create.py Create the database This script will drop all tables before creating
- data/populate_user.py Create a user
- data/import_categories.py Import categories from categories.csv
- data/populate_links.py Add links their categories
If you want to manually delete data from tables, open a SQL window (pgAdmin 4)
delete from delete from link_category
delete from categories
delete from links
delete from users
virtualenv env
pip3 install flask
pip3 install gunicorn
git init
- add .gitignore with
env
- add Procfile with
web: gunicorn app:app
- run
pip3 freeze > requirements.txt
git commit -m"...
heroku login
heroku create
git push heroku master
heroku open
- Navigate to https://www.heroku.com/, and create an account if you don’t already have one.
- On Heroku’s Dashboard, click “New” and choose “Create new app.” Give your app a name, and click “Create app.”
- On your app’s “Overview” page, click the “Configure Add-ons” button.
- In the “Add-ons” section of the page, type in and select “Heroku Postgres.”
- Choose the “Hobby Dev - Free” plan, which will give you access to a free PostgreSQL database that will support up to 10,000 rows of data. Click “Provision.”
- Now, click the “Heroku Postgres :: Database” link.
- You should now be on your database’s overview page. Click on “Settings”, and then “View Credentials.” This is the information you’ll need to log into your database.