Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1507

Node.js https does not work in Cloud9

$
0
0

I can create an http server and it works fine, but as soon as I try to use https instead, the server runs without errors but I cannot connect to it at all.

HTTP (working):

http.createServer(app).listen(process.env.PORT, process.env.IP);

HTTPS (not working):

var options = {  key: fs.readFileSync('server.key'),  cert: fs.readFileSync('server.crt')};https.createServer(options, app).listen(process.env.PORT, process.env.IP);

There are no errors in either method, but when I use HTTPS, there is no response when visiting the webpage and the server acts like it's not even receiving a request. Is there something wrong with the port I'm using from the Cloud9 environment? I have tried for hours to figure out what the problem is but haven't made any progress, hopefully someone can help out.


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>