heroku:node / mongo app不在沙盒模式下服务

时间:2023-01-12 18:33:26

if i pull my app down fresh from git and run the following command(s), the app runs just fine locally (with expected API event errors bc ive hooked it to a blank mongodb instance)

如果我从git中删除我的应用并运行以下命令,应用程序在本地运行就好了(预期的API事件错误,我已经将它挂钩到一个空白的mongodb实例)

nodemon server.js
node server.js

furthermore, the app builds successfully on heroku ...but does not serve! the only error message in the logs seems to be this:

此外,该应用程序在heroku上成功构建...但不提供服务!日志中唯一的错误消息似乎是这样的:

heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=shewhat.herokuapp.com request_id=e42d1304-c91b-4e72-b965-1d06ec363815 fwd="73.208.41.187" dyno= connect= service= status=503 bytes=

i have the app setup on heroku with a mLab mongoDB add-on installed

我在heroku上安装了应用程序,并安装了mLab mongoDB附加组件

i have already set this:

我已经设置了这个:

export MONGOLAB_URI=" mongodb://<dbuser>:<dbpassword>@ds029426.mlab.com:29426/my-db-name"

i have added a PROCFILE with one process line of "node server.js"

我添加了一个PROCFILE与一个“node server.js”的流程行

it is linked up with a github repo.

它与github repo相关联。

what is going on here?

这里发生了什么?

1 个解决方案

#1


0  

Install the Heroku toolbelt and start some logging ;-)

安装Heroku工具带并开始记录;-)

do something like:

做类似的事情:

 heroku logs --tail

and restart your dyno's

并重新启动你的d​​yno

If you not already checked see this document: https://devcenter.heroku.com/articles/deploying-nodejs

如果您尚未查看,请参阅此文档:https://devcenter.heroku.com/articles/deploying-nodejs

After your comment below, i noticed you added the PROCFILE later. I'm guessing Heroku set your dyno's scale to 0 :|.

在您的评论下面,我注意到您之后添加了PROCFILE。我猜Heroku将你的dyno刻度设置为0:|。

You could execute:

你可以执行:

heroku ps:scale web=1

Additional info: Please check this link: https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running

其他信息:请检查此链接:https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running

#1


0  

Install the Heroku toolbelt and start some logging ;-)

安装Heroku工具带并开始记录;-)

do something like:

做类似的事情:

 heroku logs --tail

and restart your dyno's

并重新启动你的d​​yno

If you not already checked see this document: https://devcenter.heroku.com/articles/deploying-nodejs

如果您尚未查看,请参阅此文档:https://devcenter.heroku.com/articles/deploying-nodejs

After your comment below, i noticed you added the PROCFILE later. I'm guessing Heroku set your dyno's scale to 0 :|.

在您的评论下面,我注意到您之后添加了PROCFILE。我猜Heroku将你的dyno刻度设置为0:|。

You could execute:

你可以执行:

heroku ps:scale web=1

Additional info: Please check this link: https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running

其他信息:请检查此链接:https://devcenter.heroku.com/articles/error-codes#h14-no-web-dynos-running