Distributed Socket.io Chat, backed by Redis, hosted on Heroku
Switch branches/tags
Nothing to show
Clone or download
Latest commit 90a0168 Feb 2, 2017
Permalink
Failed to load latest commit information.
bin fixed typo Feb 2, 2017
.gitignore initial commit Feb 2, 2017
Procfile initial commit Feb 2, 2017
Procfile.dev initial commit Feb 2, 2017
app.json add heroku-redis addon Feb 2, 2017
index.html slim min recent jquery Feb 2, 2017
package.json rename Feb 2, 2017
readme.md scaling example Feb 2, 2017
yarn.lock initial commit Feb 2, 2017

readme.md

Socket.io Chat Example

Socket.io across multiple nodes, backed by redis, on Heroku.

Deploy

Deploying to Heroku via CLI

$ heroku create
$ heroku addons:create heroku-redis
$ git push heroku master
$ heroku open

Scaling

Socket.io requires sticky sessions in order to be scaled up. On Heroku, you can enable that with:

$ heroku features:enable http-session-affinity
$ herouk scale web=4:standard-1x

Developing locally

$ yarn
$ heroku local -f Procfile.dev

You'll need a redis server. Set one up on localhost, or just use a free Heroku-hosted server:

$ heroku create
$ heroku addons:create heroku-redis
$ heroku config -s > .env

(the last line copies the REDIS_URL value to your local .env config file)