Search code examples
socket.iolocalhostcloud9-ide

How to access localhost on Cloud9 with Socket.IO


I'm following this tutorial and using Cloud9, but when I run node index.js I can't seem to find it.

I've looked at these two posts, but neither seem to work for me. Am I just following their instructions wrong?


Solution

  • I needed to set the server to listen on 8080 (as Mutahhir suggested) and then point my web browser to http://workspacename.username.c9.io (as Kendell mentioned on another question). Make sure that its an http connection, not an https connection.

    To set the server to listen on 8080, you just change 3000 to 8080 in the index.js file.

    Then, the "Hello World" shows up as it's supposed to.