我已经制作了一个Node.js应用程序并想在Heroku上部署它.我正在关注Heroku doc,一切正常.foreman start正确启动我的应用程序
我把它推到Heroku,没问题(除了警告因为我没有指定Node.js版本,没什么不好)然后,当我想要做的时候heroku ps:scale web=1我有这个错误:
Scaling web dynos... failed
! No such type as web.
Run Code Online (Sandbox Code Playgroud)
这是内容 Procfile
web: node app.js
Run Code Online (Sandbox Code Playgroud)
任何的想法 ?
小智 8
可能你忘了推Procfile到heroku,如下图所示:
$ heroku ps:scale web=1
Scaling web dynos... failed
! Resource not found
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Procfile
no changes added to commit (use "git add" and/or "git commit -a")
$ git add Procfile
$ git commit -m "Add Procfile for Heroku"
$ git push heroku
$ heroku ps:scale web=1
Scaling web dynos... done, now running 1
Run Code Online (Sandbox Code Playgroud)
我希望它有帮助:)
| 归档时间: |
|
| 查看次数: |
3655 次 |
| 最近记录: |