Giter VIP home page Giter VIP logo

simple-twitter-aggregator's Introduction

simple-twitter-aggregtor

This is a simple twitter aggregator app. It takes a search input, and then searches tweets within the last 7 days for tweets that have matching content (this includes @'s and #'s). It then displays the 10 most recent posts that match the search.

This app is split into two parts: 1) The Backend 2) The Frontend

The app requires both parts to run.

Setup

Requirements

  1. Node JS

  2. npm or yarn

  3. A twitter app: https://apps.twitter.com/

Backend

Within backend directory, run: npm install (this installs all the dependencies for the backend)

Twitter requires authentication to use their API. This requires creating a twitter app in order to get the necessary keys and passwords to access the API. This tutorial can help walk you through these steps: https://iag.me/socialmedia/how-to-create-a-twitter-app-in-8-easy-steps/

Once you have that setup, in the backend directory create a new file called: config.js

Inside this file add the following code:

module.exports = {
  "consumer_key": "XXX",
  "consumer_secret": "XXX",
  "access_token_key": "XXX",
  "access_token_secret": "XXX",
  "cors_whitelist": "*",
}

This file contains sensitive information now, so be careful not to share it with anyone else!

Finally, to start the backend server, simply run: npm start

And voila! Your backend server for communicating with twitter is now running.

Frontend

Within the frontend directory, run: npm install (this installs all the dependencies for the frontend)

To run the app, run: npm start

This will open up a locally running version of your app at http://localhost:3000 (if it does not automatically open, just type that url into your browser)

And there you have it! You should be able to see the twitter aggregator in action in your browser.

You may test the frontend by running: npm test (in frontend directory)

Production

Again, for production you need to have both parts of this app implemented for it to work.

Backend

Set up the backend on server.

Frontend

In the fontend update the app config file to reference the backend server. To do this, open frontend/src/config.js and change the API_URL to that of your backend server.

Then create the production build of the app by running: npm build

Upload the code from the /build folder to a front end server and let the world enjoy your app!

simple-twitter-aggregator's People

Contributors

kilowattkris avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.