Hi,
I am on a shared hosting and my SSL works just fine when I access my site like this: https://example.net but I have a node server running on port 3000 which I can only access like this: http://example.net:3000 but I want to access it via https as well. My server configuration file looks like this:
const app = require("express")();
const httpServer = require("http").createServer(app);
app.get('/', function (req, res, next) {
res.sendFile(__dirname + '/index.html');
});
I found out that I have to include these files for the certificate:
var certificate = {
key: fs.readFileSync('/etc/letsencrypt/live/example.com/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/example.com/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/example.com/chain.pem')
};
for starters I dont know where to put this in my code and secondly I think I dont even have access to those files because I have no root access. What should I do?
Thank you.