nodejs 在express中创建https 服务器

 //创建https服务器
const https=require("https");
const fs=require("fs")
const options={
    key:fs.readFileSync('cert/213993262440896.key'),
    cert:fs.readFileSync('cert/213993262440896.pem')
}

var server=https.createServer(options,app);

你可能感兴趣的:(nodejs 在express中创建https 服务器)