Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heroku-examples/play-websockets-chat-sample
https://github.com/heroku-examples/play-websockets-chat-sample
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/heroku-examples/play-websockets-chat-sample
- Owner: heroku-examples
- Created: 2013-10-04T07:05:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-08T02:29:00.000Z (over 11 years ago)
- Last Synced: 2024-04-14T18:35:50.892Z (10 months ago)
- Language: CSS
- Size: 164 KB
- Stars: 28
- Watchers: 14
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scalable chat application with Play and WebSockets
This is a version of the [Play](http://www.playframework.com/) websockets [chat sample](https://github.com/playframework/playframework/tree/master/samples/java/websocket-chat) that uses redis pub/sub to allow for a single chatroom that works across multiple nodes.
# Running
The application requires a Redis connection. This is configured in applicaiton.conf:
```
# Redis configuration
redis.uri=${REDISCLOUD_URL}
```Set the URL into an environment variable or delete this line to run Redis locally on the default port.
Once setting up Redis you can run with
``` bash
$ play run
```# Running on Heroku
``` bash
$ heroku create --buildpack https://github.com/jamesward/heroku-buildpack-scala.git
$ heroku labs:enable websockets
$ heroku addons:add rediscloud
$ git push heroku master
$ heroku open
```