无法使用restify设置localhost https服务器
我试图在本地主机上运行restify https服务器,但我不断收到“0 NO RESPONSE”。 我试图按照与node,https,localhost等相关的关键字find所有的例子(所有的例子都非常相似和简单,几乎没有错)。 还检查了收听端口的应用程序,但它仍然是“0 NO RESPONSE”。
如果我删除服务器代码上的httpsconfiguration,并将请求更改为http,那么一切工作正常。 这里可能出了什么问题?
编辑:我的代码是这样的
import restify from 'restify'; ... const server = restify.createServer({ key: fs.readFileSync(path.join(__dirname, '..', 'key.pem')), certificate: fs.readFileSync(path.join(__dirname, '..', 'cert.pem')) }); ... server.listen(443, function()...);
- 尝试使用节点发出'POST'请求
- 用godaddy gd_bundle.crt运行SSL node.js服务器
- 我如何使用https代理和node.js https / request客户端?
- 如何避免HTTPSconfiguration的Express服务器上的“网站不安全”
- 在node.js中调用https Web服务(在代理后面)
- Node.js上的服务器HTTPS不起作用
- Firebase HTTP云端函数.send()返回什么?
- 带有HTTPS请求的Node.JS UnhandledException
- 我在我的node.js https服务器中使用.pfxauthentication,我不能在选项中使用“密码”