Code Monkey home page Code Monkey logo

mongoose-scraper's Introduction

Mongoose-Scraper

A web app that lets users view and leave comments on the latest news.

This full-stack application allows a client to scrape headlines, links, and (if available) excerpts from the Daily Universe website. The client can then save the articles in a database, delete saved articles, make notes on specific articles, and delete those notes.

Daily Universe website

Scraping

The application uses "request" and "cheerio" for scraping the Daily Universe HTML. The articles scraped are compared to the ones in the database, and if the articles hasn't already been stored, it is put into an object which is rendered on the "/scrape" route with the help of the "express-handlebars" npm package. Both the scrape page and the Saved Articles page display links to the associated articles so that the user may check out the full articles before saving or writing a comment.

Scrape route

Saved Articles

The articles are saved to the database with the help of the Mongoose NPM. According to their page, "Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment." This application uses Article and Note models with the Article model containing an array "note" that stores the ObjectIds of any associated Note. From the Saved Articles page, the client can delete an article from the database or navigate to the article's Note/Comment page in order to see any associated notes/comments or to make a comment. The data on all routes is redered with "express-handlebars".

Saved Articles Route

Comment Section

The client can make a note or read a comment by navigating to the "/articles/_id" route where the user can read, delete, or create a comment/note.

Article Comments Route

About this Application

This repository is for an application deployed at: https://boiling-island-52680.herokuapp.com/ This repository is for a full stack JavaScript application, employing various technologies, including NPM packages (Express, Express-Handlebars, Body Parser, Morgan, Mongoose, Request and Cheerio), Handlebars templating, database handling, and styling with CSS. The application allows the client to interact with a server to submit and update data. The application employs a simple client/server full-stack approach, with a front end (HTML-Handlebars, CSS), middleware (Express, Body-parser) and back end (Mongoose models). This project was created and is maintained by me, Marjika Howarth.

mongoose-scraper's People

Contributors

marjika avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.