[英]Is possible to run http and https server with same port no in node.js using express?
我有兩個帶有密鑰的服務器HTTP和HTTPS。一旦通過身份驗證,則需要在同一端口將Http更改為HTTPS。
var httpsoptions={
key:fs.readFileSync('./keys/twc-key.pem'),
cert:fs.readFileSync('./keys/twc-cert.pem')
};
var webServer = express();
var websecure = express(httpoptions);
在這里,我需要為Http和Https維護相同的端口,怎么可能?
https://secure.url.com
https://login.url.com
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.