Skip to content

A web app integrates with Reddit’s API to show the top posts in a given subreddit

Notifications You must be signed in to change notification settings

talhazi/RedditFeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d3028c · Feb 20, 2022

History

2 Commits
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022

Repository files navigation

Reddit Feed

This web app integrates with Reddit’s API to show the top posts in a given subreddit.

The flow of the code is as follows:

  1. The subreddit search form accepts searchTerm, sortBy and searchLimit as queries.
  2. When the form identifies a 'submit' event, it parses the search queries.
  3. Then it send a GET request according to that queries, to fetch the recent data from Reddit API.
  4. Iterate through the relevant data (subreddit's posts) and parse all as HTML code.
  5. Add the results to the Main view index.ejs file.

Application deployed on Heroku: https://reddit-tal.herokuapp.com/

Application screenshot:

App screenshot

Tests

To run the tests:

npm test

Built with

  • Express as Node.js web application framework
  • Ejs to include dynamic data to the html
  • Bootstrap as the CSS framework
  • Mocha as testing framework

Running the app

To launch the application locally:

  1. Clone repo:
    git clone https://github.com/talhazi/RedditFeed.git
    
  2. Enter the directory:
    cd RedditFeed
    
  3. Install dependencies:
    npm install
    
  4. Run the app:
    npm start
    
    # dev mode
    npm run dev
    
    Now the server should run at: http://localhost:3000

Contact

Tal Hazi <> [email protected]

About

A web app integrates with Reddit’s API to show the top posts in a given subreddit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published