Can I set up socket.io chat on heroku?

前端 未结 7 728
栀梦
栀梦 2021-02-01 16:46

I have a simple socket.io chat application which I\'ve uploaded to one of the new Heroku \'cedar\' stacks.

Now I almost have everything working but I\'ve hit one stumbli

7条回答
  •  情书的邮戳
    2021-02-01 16:54

    I was also having this problem on heroku. I was able to make it work using the hostname "myapp.herokuapp.com" (or simply window.location.hostname, to work both local and in production) and setting the port to 80. I'm using SocketIO 0.6.0.

提交回复
热议问题