I would expect to load the key and cert into my website in order to have an HTTPS site. I have the certificates in opalstack but how can I use them in my node js site? I expect to be able to read them from the server as show in the code below, which would be from the app.js file;
const https = require("https"),
fs = require("fs");
const options = {
key: fs.readFileSync("/srv/www/keys/my-site-key.pem"),
cert: fs.readFileSync("/srv/www/keys/chain.pem")
};
const app = express();
app.use((req, res) => {
res.writeHead(200);
res.end("hello world\n");
});