https://github.com/fif0o/twitterapp
🐧 app using twitter api built in javascript and using webpack to bundle files, bootstrap-sass is used front-end
https://github.com/fif0o/twitterapp
es6 express javascript oauth2-flow pug twitter-api webpack
Last synced: 3 months ago
JSON representation
🐧 app using twitter api built in javascript and using webpack to bundle files, bootstrap-sass is used front-end
- Host: GitHub
- URL: https://github.com/fif0o/twitterapp
- Owner: FiF0o
- Created: 2017-03-06T18:50:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-20T23:08:08.000Z (about 9 years ago)
- Last Synced: 2025-11-14T14:12:34.035Z (8 months ago)
- Topics: es6, express, javascript, oauth2-flow, pug, twitter-api, webpack
- Language: JavaScript
- Homepage: https://twitterfeedapp-lmhovpbcud.now.sh
- Size: 190 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitter app
##[Twitter feed app](https://twitterapp-kxtpaplvot.now.sh)
Static website using the Twitter API to return a tweet feed.
We are using `/search/tweets` twitter endpoint - [search/tweets endpoint](https://dev.twitter.com/rest/reference/get/search/tweets).
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](https://github.com/facebookincubator/create-react-app).
## Prerequisites
### Routes
- `/` route
- `/tweets` route
### API calls with OAuth2 flow.
[OAUTH2 flow](https://dev.twitter.com/oauth/reference/post/oauth2/token). Bearer token needed - [Obtain a bearer token](https://dev.twitter.com/oauth/application-only) - 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: "",
accessTokenSecret: "",
consumerToken: "",
consumerTokenSecret: """,
}
```
## 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](https://zeit.co/docs/)
`npm run deploy`, and make sure to add your now secret keys - `now secret add ` - 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.