Skip to content

HennadiiMariiev/rss-parser-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSS Parser Server

General

This is a simple server-side application for parsing Lifehacker RSS feed. App is based on express-framework and written on vanilla JS.

App Stack

For parsing RSS this app uses the following packages/libraries:

  • puppeteer - for "emulating" chrome-browser in node.js
  • cheerio - for parsing markup and providing manipulations with the resulting data structure
  • node-schedule - for scheduling parser's jobs

Also next packages are used in app to provide it functionality:

  • jsonwebtoken - for smooth and secure auth process
  • mongoose - for providing data storing in MongoDB
  • nodemailer - for sending confirmation email to registered users

App Functionality

This app parses lifehacker RSS for new posts by schedule and stores data in MongoDB. The RSS parsing is configured with cron-like schedule (by default it performs parsing every hour). For comfortable hand-shaking with this app, the database is seeded with mock data on container's start. Unauthorized users can get all posts using pagination, filter by creators and categories, sort by date and title, search by title and description as well. Registered and authorized users (admins) can perform CRUD operations on posts, categories and creators. After successful registration, new admin receives an email for confirmation.

N.B.!:

If you want to sign in as admin in dev mode without email verification, feel free to use next credentials (no worries: this won't hurt any app's security - this works only in container and local database):

Live Server App

The App Server is currently located on render platform.

Docker and Makefile

This is containerized app. Please, check out ./Makefile with most used commands for quick application start.

  • make up | Start all containers (in background)
  • make down | Stop all started containers
  • make install | Install deps
  • make shell-once | Start node container
  • make run-start | Start node container and start app
  • make run-dev | Start node container and start app in development mode

Please, feel free to use this repo))

Clone it, install dependencies, paste your environment variables described in .env-example files and run the app.