A Node.js application that uses Express and Pug along with Twitter's REST API to access data for a Twitter account and renders it to the local host.
This project was created as a part of the Treehouse Full Stack JavaScript Techdegree program.
- Accesses information on a Twitter account using Twitter's REST API
- Automatically authenticates access to a Twitter profile
- Displays recent tweets, recent friends, and recent direct messages
- Allows user to send tweets
- Displays user friendly error page if a page doesn't exist
- Running
npm installinstalls relevant dependencies
- Download project files by running
git clone https://github.com/LeeVaughn/twitter-interface - Navigate to the project folder
- Install dependencies with
npm install - You will need to create your own config.js file using this format:
const T = {
consumer_key: "...",
consumer_secret: "...",
access_token: "...",
access_token_secret: "...",
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests.
strictSSL: true, // optional - requires SSL certificates to be valid.
};
module.exports = T;- The config.js file should be saved in the same directory as app.js
- Type
npm startornode app.jsto run application (application runs on localhost:3000)
- express Fast, unopinionated, minimalist web framework for node
- pug A clean, whitespace-sensitive template language for writing HTML
- Twit Twitter API Client for node
- body-parser Node.js body parsing middleware
- date-fns Modern JavaScript date utility library
- Deploy on Heroku
- Consider integrating the Twitter's Streaming API
- Project Homepage - coming soon!
- Repository