Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/learnetto/reactchat
A chat app built with React.js and ActionCable in Ruby on Rails 5.1
https://github.com/learnetto/reactchat
javascript rails rails5 react reactjs ruby ruby-on-rails
Last synced: about 1 month ago
JSON representation
A chat app built with React.js and ActionCable in Ruby on Rails 5.1
- Host: GitHub
- URL: https://github.com/learnetto/reactchat
- Owner: learnetto
- Created: 2017-08-31T08:28:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-29T07:17:02.000Z (about 7 years ago)
- Last Synced: 2024-11-20T14:50:32.571Z (about 2 months ago)
- Topics: javascript, rails, rails5, react, reactjs, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://reactrooms.herokuapp.com/
- Size: 81.1 KB
- Stars: 94
- Watchers: 1
- Forks: 19
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Chat
A chat app built with React.js and ActionCable in Ruby on Rails 5.1, built as part of a 2-part tutorial on [Learnetto](https://learnetto.com):
[How to build a chat app with Rails 5.1 ActionCable and React.js Part 1](https://learnetto.com/tutorials/how-to-build-a-chat-app-with-rails-5-1-actioncable-and-react-js-part-1)
[How to build a chat app with Rails 5.1 ActionCable and React.js Part 2](https://learnetto.com/tutorials/how-to-build-a-chat-app-with-rails-5-1-actioncable-and-react-js-part-2)
[See a live demo here](https://reactrooms.herokuapp.com)
Run the following commands on the commandline to get it working:
```
git clone https://github.com/learnetto/reactchat.gitcd reactchat
rails db:migrate
bundle && yarn
foreman start -f Procfile.dev
```## Github Authentication
We use Github for authentication. So you will need to [register a new OAuth application on Github](https://github.com/settings/applications/new).
Please make sure you set the authorization callback URL correctly. With the default devise and omniauth settings, add `/users/auth/github/callback` to your root URL.
For example, in development, if your app is running on localhost port 3000, then the URL settings will be:
Homepage URL: `http://localhost:3000`
Authorization callback URL: `http://localhost:3000/users/auth/github/callback`
Once you've set up your Github app, Github will provide you with a Client ID and secret. You need to add these to your app's environment as `GITHUB_APP_ID` and `GITHUB_APP_SECRET`.
For development, the easiest way is to put them in your `~/.bash_profile`, start a new terminal window and restart your Rails server.