Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.54 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.54 KB

reddit-fact

@FlashBlaze/reddit-fact is released under the MIT license. PRs welcome! Netlify Status

A simple React app which displays a random fact from Reddit using their API.

🎉 Site is live here 🎉

How to use

  1. Create and register your script app here

  2. Clone the repo and go into it. Run npm install to install the dependencies.

  3. Create a config folder in src directory and create a data.js file in it.

    The directory structure is something like this:

    project
    |
    |
    |-src
     |
     |
     |-config
         |data.js
    
  4. Create a requester like so and export it:

    const snoowrap = require('snoowrap');
    
    const r = new snoowrap({
      userAgent: 'put your user-agent string here',
      clientId: 'put your client id here',
      clientSecret: 'put your client secret here',
      username: 'put your username here',
      password: 'put your password here'
    });
    
    export default r;

    For more info, you can refer this