首页 > 解决方案 > 登录系统nodejs在heroku中不起作用

问题描述

我制作了一个登录系统,可以在我的本地服务器上使用 MongoDB 连接并完成所有工作!但是当我将它部署到 Heroku 时,它一直有效,直到我注册/登录应用程序崩溃为止。

2020-09-06T05:21:29.834411+00:00 app[web.1]:     at TLSSocket.emit (events.js:315:20)
2020-09-06T05:21:29.834412+00:00 app[web.1]:     at net.js:674:12
2020-09-06T05:21:29.834413+00:00 app[web.1]:     at TCP.done (_tls_wrap.js:567:7) {
2020-09-06T05:21:29.834413+00:00 app[web.1]:   errorLabels: [ 'TransientTransactionError' ],
2020-09-06T05:21:29.834414+00:00 app[web.1]:   [Symbol(mongoErrorContextSymbol)]: {}
2020-09-06T05:21:29.834414+00:00 app[web.1]: }
2020-09-06T05:21:30.042423+00:00 heroku[router]: at=info method=GET path="/" host=stud2emp.herokuapp.com request_id=005e4791-367b-46a7-97e6-0ddb254f0bc6 fwd="93.172.152.146" dyno=web.1 connect=0ms service=31ms status=304 bytes=276 protocol=https
2020-09-06T05:21:34.085261+00:00 heroku[router]: at=info method=GET path="/users/login" host=stud2emp.herokuapp.com request_id=f66c3b5e-e722-4bf0-8905-da9689c9096b fwd="93.172.152.146" dyno=web.1 connect=0ms service=7ms status=304 bytes=152 protocol=https
2020-09-06T05:22:07.270229+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/users/login" host=stud2emp.herokuapp.com request_id=9ae52ff0-7cfd-4dde-96eb-cd4a33116b30 fwd="93.172.152.146" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https```

标签: node.jsauthenticationheroku

解决方案


推荐阅读