Skip to content

🐧 app using twitter api built in javascript and using webpack to bundle files, bootstrap-sass is used front-end

Notifications You must be signed in to change notification settings

FiF0o/twitterapp

Repository files navigation

Twitter app

##Twitter feed app

Static website using the Twitter API to return a tweet feed.
We are using /search/tweets twitter endpoint - search/tweets endpoint.
App runs on node port or :8889.


Static assets served on port :8888 if needed.

Dev mode:

npm run dev

The app is bootstrapped with create-react-app.

Prerequisites

Routes

  • / route
  • /tweets route

API calls with OAuth2 flow.

OAUTH2 flow. Bearer token needed - Obtain a bearer token - to access Twitter API endpoints.
Proxy handling OAUTH and Twitter API request is running on node port or :8889.
npm run proxy and its route is /search/token.

Want your own token to extend the app?

Register to the twitter API website.
create a token.js file in the config dir exposing your App token accessToken, consumerToken, consumerTokenSecret and accessTokenSecret keys from your Twitter API:

module.exports = {
    accessToken: "<YOUR_OWN_ACCESS_TOKEN>",
    accessTokenSecret: "<YOUR_OWN_ACCESS_TOKEN_SECRET>",
    consumerToken: "<YOUR_OWN_CONSUMER_TOKEN>",
    consumerTokenSecret: ""<YOUR_OWN_CONSUMER_TOKEN_SECRET>",
}

Scripts

npm run build to bundle the app.
npm run dev for development mode.
npm run lint to lint your code.

Deploy

Deployed with now

npm run deploy, and make sure to add your now secret keys - now secret add <YOUR_4_KEYS> - before deploying.
Run now secret list to show your secret variables - will be passed in your npm scripts as @yourkey.

Improvements

  • tests
  • pug js templates compiled on client side
  • switch builds scripts from webpack to gulp
  • user sessions

Notes

Debug:

In dev mode /test/controller route is available to render a pug template serverside via DOM injection on clientside.

About

🐧 app using twitter api built in javascript and using webpack to bundle files, bootstrap-sass is used front-end

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published