Skip to content

bcmiller713/news-scraper-npr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPR News Scraper

This app allows users to view NPR News articles, save their favorites onto another page, and comment on their favorites. Each article displayed includes a headline which is also a link to the source article and a description that includes the date of publish. There is a 'remove' button next to each article on the saved articles page, but currently it does not work. The app uses Node/Express for the server and routing, MongoDB/Mongoose for the database and models, Handlebars for the layout and views, & Cheerio/Request for scraping the data from www.npr.org

Live Demo

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development. I will assume that you already have Node.js and MongoDB installed locally. See deployment for notes on how to deploy the project on a live system.

  1. Install dependencies
  2. In your CLI, enter mongod
  3. In a new CLI window, go to root of directory and enter node server.js
  4. In browser, navigate to http://localhost:3000

Dependencies

You will need to npm install the following node modules:

  1. express
  2. express-handlebars
  3. mongoose
  4. body-parser
  5. cheerio
  6. request

Since I have included a package.json file, you do not need to install dependencies by name. Simply run the following in the root of your directory:

npm install

Deployment

Follow these instructions to deploy your app live on Heroku

Create a heroku app in your project directory

heroku create <projectName>

Provision mLab MongoDB add-on for your project

heroku addons:create mongolab

Now your project should be successfully deployed on heroku.

Screenshots

Article search home screen

screenshot-1

Article comments modal

screenshot-2

Future Updates

  1. Make 'remove' button successfully remove articles from the saved articles page
  2. Polish comment section UI