对于在gcp应用引擎上部署的应用程序,我无法连接到我的mlab mongodb。该应用程序在部署到heroku和localhost时运行良好。我检查了类似Connecting Mongoose on Google App Engine的类似线程,但仍然找不到解决方法它。
(node:531) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 1): MongoNetworkError: failed to connect to
server[ds111422.mlab.com:11422] on firstconnect [MongoNetworkError:
connection 0 to ds111422.mlab.com:11422 timed out] (node:531) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In the
future, promise rejections that are not handled will terminate the Node.js
process with a non-zero exit code.
我已经检查了Google文档,可以找到任何用于猫鼬连接的东西,只有一个可以使用纯nodejs直接连接。 预先感谢