const sslOptions = {
key: fs.readFileSync('ssl/private-key.pem'), // replace with the path to your private key
cert: fs.readFileSync('ssl/certificate.pem'), // replace with the path to your SSL certificate
ca: fs.readFileSync('ssl/ca-certificate.pem') // optional, needed if you're using a full certificate chain
};
const server = https.createServer(sslOptions, app);
Bu şekilde çözüm buldum.