coding-to-music / coding-to-music.github.io

https://pandemic-overview.readthedocs.io/en/latest/index.html
MIT License
2 stars 8 forks source link

Ndtv News Scraper Using MongoDB #367

Open coding-to-music opened 2 years ago

coding-to-music commented 2 years ago

NdtvNewsScraperUsingMongoDB

https://github.com/coding-to-music/NdtvNewsScraperUsingMongoDB

https://github.com/raj123raj/NdtvNewsScraperUsingMongoDB

Using Mongoose, Node JS, Cheerio, NDTV news website is scraped and data is loaded into Mongo DB database

This is a full-stack JavaScript app built using MongoDB, Mongoose, Node.js, Express.js, Handlebars.js, HTML, and CSS. It scrapes the NDTV homepage and stores article titles and links

Get new articles, save favorites, and write notes

To see updated news stories, click Get new articles at the top of the Home page. To view the full article, click the View article on NDTV link.

When you see an article in the list that you want to mark as a favorite, click Save article, and read it again by clicking Saved articles in the top menu bar. After you have an article in your saved list, you can comment on it by clicking Add note.

Note: There is no login system, so all saved articles and comments are visible to and can be deleted by all users.

Local set up for development purposes

These must be installed to run the app locally: For any Node JS projects, this is the mandatory step

IDE

Visual Studio Code is the best IDE to code Node JS and Mongoose related projects

Important instructions

  1. You first need to make a local MongoDB database named ndtvnews.
  2. Then, in a terminal window, navigate into the folder where you downloaded this app and type npm install. All the dependencies mentioned in package.json file will be installed and this is a mandatory step
  3. To start the app, type node server.js and open your browser to localhost:3000.
  4. In case if 3000 port is used by some other process in your system, feel free to change the port number in "server.js"

set the file .env with connection details for MongoDB Atlas (get from the Atlas dashboard)

MONGODB_URI="mongodb+srv://userid:password@cluster0.zadqe.mongodb.net/NDTV-News-Scraper?retryWrites=true&w=majority"

To start the app, type node server.js and open your browser to https://localhost:3000

node server.js

Technology

Adding a note