This application uses Cheerio to scrape the articles from The Onion. It allows users to save articles to a MongoDB and allows comments to be attached to the saved articles.
-
The application is located as follows:
-
Heroku deployment: The Onion Mongo Scraper
-
GitHub repository: The Onion Mongo Scraper GitHub Repository
-
-
Clicking the
New Articles
button will scrape the articles off The Onion website and display the headlines linked to the full story on The Onion website. A picture (if available) and summary (if available) of the article are also displayed. -
Clicking the
Save Article
button next to the article headline will save the article's information into a Mongo Database.
-
Clicking the
Saved Articles
button will pull the saved information from the Mongo Database and display the articles as before except with two buttonsDelete Article
andComments
. -
Clicking the
Delete Article
button will remove the article and all associated comments from the database.
-
Clicking the
Comments
button will open a modal that will allow the user to add a comment to the article. Multiple comments can be associated with the same article and will display in a list just above the new comment text box. -
Clicking the
x
next to the comment will remove just that comment from the database.