Answer the question
In order to leave comments, you need to log in
How to install ssl certificate on a port?
There is a socket server node.js (via nohup), which hangs on port 8585. The entire site was transferred to https through a certificate from let's encrypt. Therefore, the browser refused to work with http://ip:8585
web sockets.
Goal: connect to node.js server at: https://domain:8585
.
Question: do I need to include an ssl certificate for this port or not (and how?)? Or is it enough to enable https processing in the Node.js script itself?
Answer the question
In order to leave comments, you need to log in
options = {
key: fs.readFileSync('ssl/cert.key'),
cert: fs.readFileSync('ssl/cert.crt')
};
server = require('https').Server(options, express);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question