[英]Is possible to run http and https server with same port no in node.js using express?
I have two server HTTP and HTTPS with key.Once I authenticated then I need to change Http to HTTPS at the same port.. 我有两个带有密钥的服务器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);
Here I need to maintain same port for both Http and Https how is possible? 在这里,我需要为Http和Https维护相同的端口,怎么可能?
https://secure.url.com
https://login.url.com
https://login.url.com
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.