https://github.com/driftingruby/003-actioncable-in-production
Taking a look at ActionCable and switching from Puma to Thin. On server reboot, spin up the ActionCable service.
https://github.com/driftingruby/003-actioncable-in-production
Last synced: 10 months ago
JSON representation
Taking a look at ActionCable and switching from Puma to Thin. On server reboot, spin up the ActionCable service.
- Host: GitHub
- URL: https://github.com/driftingruby/003-actioncable-in-production
- Owner: driftingruby
- Created: 2015-07-21T03:33:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-21T03:33:28.000Z (over 10 years ago)
- Last Synced: 2025-02-15T08:31:37.921Z (12 months ago)
- Language: Ruby
- Homepage: https://www.driftingruby.com/episodes/actioncable-on-production
- Size: 133 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Action Cable Examples
A collection of examples showcasing the capabilities of Action Cable.
## Dependencies
You must have redis installed and running on the default port:6379 (or configure it in config/redis/cable.yml).
### Installing Redis
##### On Linux
* `wget http://download.redis.io/redis-stable.tar.gz`
* `tar xvzf redis-stable.tar.gz`
* `cd redis-stable`
* `make`
* `make install`
##### On Mac
* `brew install redis`
###### Note: You must have Ruby 2.2.2 installed in order to use redis
## Starting the servers
1. Run `./bin/setup`
2. Run `./bin/cable`
3. Open up a separate terminal and run: `./bin/rails server`
4. One more terminal to run redis server: `redis-server`
4. Visit `http://localhost:3000`
## Live comments example
1. Open two browsers with separate cookie spaces (like a regular session and an incognito session).
2. Login as different people in each browser.
3. Go to the same message.
4. Add comments in either browser and see them appear real-time on the counterpart screen.