HEROKU应用程序未运行,但生成成功错误503

时间:2020-01-14 15:34:07

标签: node.js heroku

我很新。我试图在Heroku上运行节点应用程序。它说构建成功,但仍然无法运行。香港专业教育学院尝试了很多事情,也许有人可以向我指出为什么我得到一个错误。我的github仓库是https://github.com/kpacheco84/6-static_node_express.git,非常感谢您enter image description here

HEROKU LOGS:
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   NODE_VERBOSE=false

-----> Installing binaries
   engines.node (package.json):  unspecified
   engines.npm (package.json):   unspecified (use default)

   Resolving node version 12.x...
   Downloading and installing node 12.14.1...
   Using default npm version: 6.13.4

----->恢复缓存 -node_modules已签入源代码管理,无法缓存

----->安装依赖项 检测到预构建(node_modules已经存在) 重建任何本机模块 “很久才发布此零件,只需列出包装” ----->构建

-----> Caching build
   - node_modules

-----> Pruning devDependencies
   audited 258 packages in 1.155s
   found 0 vulnerabilities


-----> Build succeeded!
-----> Discovering process types
   Procfile declares types -> web
-----> Compressing...
   Done: 26.5M
-----> Launching...
   Released v10
   https://katherinepacheco-portfolio.herokuapp.com/ deployed to Heroku

1 个答案:

答案 0 :(得分:0)

尝试用您先前在app.js中分配的app.listen(5000, () => {....变量替换var port = ... app.js中的硬编码端口号。