我正在尝试将现有的 NodeJS
应用程序部署到 heroku
. 我按照文档中列出的所有过程进行操作 .
我在procfile上写了这个:
web: node ./bin/www
但我经常得到:
进程退出状态1 2016-08-08T11:07:54.028983 00:00 heroku [web.1]:状态从开始变为崩溃2016-08-08T11:07:56.852268 00:00 heroku [router]:at =错误代码= H10 desc =“App crashed”方法= GET path =“/”host = agile-headland-49936.herokuapp.com request_id = 357f1a83-adff-4353-8e6b-6f8166cdb09b fwd =“202.166.207.112”dyno = connect = service = status = 503 bytes =
1 回答
web: node ./bin/www
这给了我一个提示你正在制作一个 Express App . 你的package.json
可能有类似的东西:您可以在 Procfile 中放置
web: npm start
. 这应该工作 . 希望这可以帮助 :)