Heroku and Websockets

Heroku provides Websocket support to the herokuapp.com domain, custom domains, and custom SSL endpoints through the experimental Heroku Labs Websockets feature.

One major caveat though is that to provision custom SSL endpoints with Websocket support, the Websockets feature should be enabled before the endpoint is provisioned. If you enable the Websockets feature for an app with an existing custom SSL endpoint, Heroku throws an error about the SSL endpoint being in use as shown in the following command line:

$ heroku labs:enable Websockets
Enabling Websockets for sampleapp... failed
!    Can not add Websockets feature when ssl-endpoint is in use.

The right way of working with existing SSL endpoints is to remove them first using ...

Get Heroku Cloud Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.