【发布时间】:2020-09-07 15:59:58
【问题描述】:
我正在尝试将我的 Node、mongoose、express 应用程序托管到 heroku (Pass)。我第一次使用heroku。该应用程序是带有登录系统的基本博客。即使经过数小时的上网和花费大量精力,我也无法托管它。错误日志在这里
2020-05-21T04:16:28.974768+00:00 app[web.1]: at Object.onceWrapper (events.js:300:26)
2020-05-21T04:16:28.974772+00:00 app[web.1]: at TLSSocket.emit (events.js:210:5)
2020-05-21T04:16:28.974773+00:00 app[web.1]: at net.js:659:12
2020-05-21T04:16:28.974773+00:00 app[web.1]: at TCP.done (_tls_wrap.js:481:7)
2020-05-21T04:16:28.974907+00:00 app[web.1]: (node:23) 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: 1)
2020-05-21T04:16:28.975048+00:00 app[web.1]: (node:23) [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.
2020-05-21T04:16:29.327348+00:00 heroku[web.1]: State changed from starting to up
2020-05-21T04:17:05.597713+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=kalovatvatey.herokuapp.com request_id=d997fd6f-7515-4249-b9e7-553ffb60197c fwd="27.34.50.52" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2020-05-21T04:17:30.629996+00:00 heroku[router]: at=error code=H15 desc="Idle connection" method=GET path="/robots.txt" host=kalovatvatey.herokuapp.com request_id=a3440026-9dc1-4ffd-a978-d7be5749b4a2 fwd="27.34.50.52" dyno=web.1 connect=1ms service=55028ms status=503 bytes= protocol=https
2020-05-21T04:18:03.329483+00:00 heroku[router]: at=error code=H15 desc="Idle connection" method=GET path="/favicon.ico" host=kalovatvatey.herokuapp.com request_id=7ea70ab2-5ae1-409f-bdab-1d79b3a2a389 fwd="27.34.50.52" dyno=web.1 connect=0ms service=55005ms status=503 bytes= protocol=httpd
git 仓库的链接也在这里 https://github.com/kalovatvatey/Blog
【问题讨论】:
-
嘿 Hemanta,首先欢迎来到 Stackoverflow 社区。所以我刚刚访问了你的仓库,当然,我访问了你的仓库,并没有太多担心,你写的代码非常干净,我很感激。您是否愿意告诉我,您正在使用什么方法在 Heroku 上上传您的应用程序,例如,您是使用 heroku-CLI 还是使用 github connect 来部署应用程序?
-
谢谢!我正在使用heroku-CLI。如果我可以使用与 Heroku-CLI 不同的方法,请提出建议。我非常感谢您的回复! :-)
-
好的 @Hemanta 我正在处理你的仓库,我已经克隆了以更好地理解流程,请注意给我几个小时来解决这个问题。我会尽快发布答案。
标签: javascript node.js express heroku mongoose