Demo : http://react-twitter-deck.herokuapp.com
First of all, git clone this repo and initialize .git
$ make init
Install client & server dependencies.
$ make install
- Go to Twitter's developer page and create a new app.
- Get Consumer API key and API secret key in
Apps > [your-twitter-app-name] > Keys and tokens
tab. - Create
.env
file inserver
directory. Updateyour-twitter-api-key
andyour-twitter-api-secret-key
.
TWITTER_KEY=your-twitter-api-key
TWITTER_SECRET=your-twitter-api-secret-key
CALLBACK_URL=http://localhost:5000/twitter/callback
NODE_ENV=development
- Create new Heroku app.
- Download and install Heroku CLI.
- Log in to your Heroku account.
$ heroku login
- Set Heroku git repository.
$ heroku git:remote -a <your-heroku-app-name/>
- Go to app setting page and config env vars in
Settings > Config Vars
tab.
TWITTER_KEY: your-twitter-api-key
TWITTER_SECRET: your-twitter-api-secret-key
CALLBACK_URL: https://<your-heroku-app-name>.herokuapp.com/twitter/callback
NODE_ENV: production
-
Run server with
yarn dev
-
Open the brower and go to http://localhost:3000/. Node.js server lives on http://localhost:5000/.
There are two ways to deploy application. ;
Initialize a git repository in a new or existing directory
$ heroku git:clone -a <your-heroku-app-name/>
Deploy your application.
$ make heroku
- Create new github repo and set remote url.
git remote add origin <your-git-repo-url>.git
- Push changes.
$ make git m="your message"
- Go to app
Settings > Deploy
tab and connect this app to GitHub.