【发布时间】:2018-02-15 01:41:26
【问题描述】:
对此有点麻烦。目前正在试用 Google Cloud,但我的 GCloud Postgres db 无法链接到我的应用引擎应用。
我正在关注这里的一切:
https://cloud.google.com/appengine/docs/flexible/nodejs/using-cloud-sql-postgres
但是,当我尝试运行 createTables.js 进程时,出现以下问题:
Failed to create 'visits' table: { Error: connect ECONNREFUSED 127.0.0.1:5432
at Object._errnoException (util.js:1026:11)
at _exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432 }
数据库并不是我的强项,所以我有点难过。
它们都在同一个 GCloud 项目中运行。
如果您需要我提供更多信息,请告诉我(不确定什么是有用的)
干杯,
杰
【问题讨论】:
-
你能解决这个问题吗?
标签: node.js postgresql google-app-engine google-cloud-platform