How to refer ajax calls to cloud9 server?


Created a node.js https server with createServer, listening on port 8080.

I’m trying to make an .ajax call from javascript/jquery hosted within the same workspace. I’m not worried about the API being accessible from the outside my application (its just for testing).

What should I use for the .ajax URL string?

I’ve tried but I keep on getting the following browser console error:


I think its something to do with c9’s utilisation of https because when I switch to using http.createServer and change the preview URL to use http, I can reach the server. But the preview URL switches back to https on every refresh, so its hardly ideal (which seems to be a browser/c9 thing, I’ve disabled https everywhere, so it’s not on my side).


No, HTTPS is fully supported for one level of subdomains. Your problem is that you need to use, with a dash, not a dot between workspace and username.