无法使用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()...);