Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slick Deals Scraper (Express, Node, Handlebars, MongoDB) #369

Open
coding-to-music opened this issue Jan 24, 2022 · 0 comments
Open

Slick Deals Scraper (Express, Node, Handlebars, MongoDB) #369

coding-to-music opened this issue Jan 24, 2022 · 0 comments

Comments

@coding-to-music
Copy link
Owner

Slick Deals Scraper (Express, Node, Handlebars, MongoDB)

Demo: https://limitless-bayou-66969.herokuapp.com/

https://github.com/coding-to-music/slick-deals-scraper-mongodb

https://github.com/vpvnguyen/slick-deals-scraper-mongodb

Application

  • Search for deals by typing in an item. Save your favorite deals for later!
  • This deals scraper uses npm cheerio and npm axios to webscrape for deals. Information is saved in MongoDB using npm mongoose and the concept of an ODM.

Start by searching for a deal! (Cheerio.js)

Save your favorite deals! (MongoDB / Mongoose.js)

Utilize the help menu if you are lost! (Materialize.css)

Configuration

  • git clone <repo>
  • npm install
  • Configure MongoDB connection in server.js:
  // connect mongodb heroku
  const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/<DATABASE_NAME>';
  mongoose.connect(MONGODB_URI, { useNewUrlParser: true, useUnifiedTopology: true });

process.env.MONGODB_URI for heroku deployment. mongodb://localhost:27017/<DATABASE_NAME> add your database.

  • Create schema model and requirements in Deals.js:
  const mongoose = require('mongoose');
  ...
  const DealsSchema = new Schema({

      title: {
          type: String,
          required: true,
          unique: true
      }
  ...

Technologies:

  • Express.js
  • Node.js
  • MongoDB / Mongoose
  • Handlebars.js
  • Cheerio.js
  • Materialize.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant