【发布时间】:2022-12-17 07:20:29
【问题描述】:
我正在尝试将 nextjs 应用程序连接到 digitalocean 中的 mongodb 我尝试将托管在我本地机器上的 nextjs 应用程序连接到 digitalocean 中的 mongodb,它工作正常, 但是什么时候部署我的应用程序我得到连接超时错误。 这是我所做的:
- 我在 digitalocean 中创建了 mongodb
- 我在本地导出 ws 并执行我的 nextjs 应用程序并连接到 digitalocean 中的 mongodb,它工作正常
- 我将我的代码推送到 github repo
- 我从那个 repo 在 digitalocean 中创建了新的应用程序
- 我将我的 mongodb mongodb 附加到应用程序并将 trush 连接添加到我在 mongodb mongodb 中的应用程序
- 我在变量 env 中添加 url 连接
7.我尝试部署我的应用程序,但我仍然收到连接超时错误
我不知道怎么了
【问题讨论】:
标签: node.js mongodb next.js digital-ocean