小编akz*_*har的帖子

从 Node.js 应用程序查询 Heroku 托管的 Postgres 数据库期间出现“自签名证书”错误

我的 Node.js 应用程序能够通过npm pg模块使用本地 Postgres 数据库。我也可以通过命令行和heroku pg:psql命令连接到 Heroku 托管的 Postgres 数据库(免费的业余爱好开发计划)。 但是当我的 Node.js 应用程序尝试查询 Heroku 托管的 Postgres 数据库时,我收到一个self signed certificate错误。

这是有self signed certificate错误的输出:

(node:2100) UnhandledPromiseRejectionWarning: Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
    at TLSSocket.emit (events.js:189:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8)
(node:2100) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: …
Run Code Online (Sandbox Code Playgroud)

javascript postgresql heroku node.js

39
推荐指数
4
解决办法
2万
查看次数

标签 统计

heroku ×1

javascript ×1

node.js ×1

postgresql ×1