accidentalbot icon indicating copy to clipboard operation
accidentalbot copied to clipboard

WebSocket and plain HTTP using the same port

Open jclgoodwin opened this issue 10 years ago • 1 comments

However, I’m hosting the bot on Heroku. Heroku only allows each dyno to have one port open—in the case of the bot, I need it for web socket connections, and thus can’t open a second port for just plain web connections.

It should be possible to use WebSocket and plain HTTP over the same port. Although perhaps not using the ws Node module -- it's definitely possible with Socket.IO...

jclgoodwin avatar May 27 '14 20:05 jclgoodwin

i was able to run the websocket server and an http server on the same port, the branch is at https://github.com/voldyman/accidentalbot

still needs work though

voldyman avatar Jun 22 '14 10:06 voldyman