Skip to content Skip to sidebar Skip to footer

How To Fix Node.js Https Server "ssl Error"?

I'm trying to use express in conjunction with a node.js https server, but I'm getting a warning when I connect. My code is: var WebSocketServer = require('ws').Server , https

Solution 1:

That's a warning your browser gives. When you take the solution live, buy a certificate and associate with your domain(be exact - wildcard or root certificate) and the warning will go away, and a beatiful lock will come to show the world how safe your site is. :-)

Solution 2:

You need to purchase a SSL certificate from a certificate authority. A google search will reveal many venders with prices ranging significantly. If you are simply developing and it is not a production website you can find free certs or very cheap certs. The reason so many certs are expensive ( > 200 USD) is that the venders offer an insurance policy which guarantees the security of the certificate. Although if your cert is compromised and you request an insurance claim from the company, proving that the cert itself was due to fault is incredibly difficult and highly unlikely.

Post a Comment for "How To Fix Node.js Https Server "ssl Error"?"