I have a local NodeJS app that’s served with HTTPS and local PEM files generated by mkcert.
Something like this:
let options = {
key: fs.readFileSync('./localhost-key.pem'),
cert: fs.readFileSync('./localhost.pem')
};
let server = https.createServer(options, app);
let port = process.env.PORT || 3000;
server.listen(port, () => {
console.log(`Server listening on port=${port}`);
});
I’ve tried adding the PEM files to the “Secret Files” section with the above filenames but when I start my server I get 502 EOF for all requests (I do get the “server listening” log).
I know that Render has managed TLS so I wonder if it’s just my configuration or I needn’t use PEM files when deploying to Render at all?