Search code examples
cloud9-ide

Can't reach Node JS api behind Cloud9


I am creating a simple rest api with hapi and using Cloud9 IDE. I can access the API endpoint within the same browser as the IDE uses but can't reach the api with code. Instead of JSON output I get the Cloud9 sign in page source.

Any ideas to set this up correctly?


Solution

  • Your workspace is probably private. You can choose to make your server public by performing the following steps:

    • Sign into c9.io and open the workspace in question
    • Click on the 'Share' menu on the top left of the IDE
    • When the Share dialog opens, check 'Public' next to the 'Application' row
    • Close the sharing dialog and test accessing your server from the api again.

    Hope this helps!