https://lisongfeng.cn/post/quick-deploy-https-in-local-development-env.html
var express = require("express");
var https = require("https");
var http = require("http");
var fs = require("fs");
// This line is from the Node.js HTTPS documentation.
var options = {
key: fs.readFileSync("./cert/lirawx.cnsuning.com.key"),
cert: fs.readFileSync("./cert/lirawx.cnsuning.com.crt")
};
// Create a service (the app object is just a callback).
var app = express();
app.use(express.static("public"));
// Create an HTTP service.
http.createServer(app).listen(80, function() {
console.log("Server is server over http://lirawx.cnsuning.com");
});
// Create an HTTPS service identical to the HTTP service.
https.createServer(options, app).listen(443, function() {
console.log("Server is server over https://lirawx.cnsuning.com");
});