Skip to content

dusova/reddit-random-image-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Random Image Fetcher

This project fetches random images from various subreddits using the Reddit API and displays them in a web application built with Express and EJS.

Features

  • Fetches random images from specified subreddits.
  • Sorting options: hot, new, top.
  • Time filtering options: hour, day, week, month, year, all.
  • Simple and easy-to-use web interface.

Technologies Used

  • Node.js
  • Express.js
  • EJS (Embedded JavaScript templates)
  • Node-fetch (for making HTTP requests)

Installation

  1. Clone the repository:

    git clone https://github.com/dusova/reddit-random-image-api.git
    cd reddit-random-image-api
  2. Install the necessary dependencies:

    npm install
  3. Start the application:

    node app.js
  4. Open your web browser and go to http://localhost:3000.

Usage

  • Visit the homepage to see a random image from the selected subreddits.
  • To view specific subreddits, go to http://localhost:3000/:subreddit_name.

Example

  • To view images from the "cats" subreddit, go to http://localhost:3000/cats.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to submit issues or pull requests to improve the functionality or features of the application!

Acknowledgements

Feel free to customize the content further!

About

Reddit API Random Image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.2%
  • EJS 7.8%