Heroku应用程序已成功推送但无法打开

时间:2018-02-01 00:50:53

标签: node.js express heroku

以下是部署/推送到Heroku时的日志。我对此非常陌生并尝试过对可能是根本错误的广泛研究,但是我必须要问。我之前在Heroku上有一个正在运行的应用程序,但我在本地做了一些更改然后删除了Heroku应用程序并决定更改遥控器。这是我的Github的链接:https://github.com/tomtam6/tom-tam.git

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  6.11.0
       engines.npm (package.json):   3.10.10

       Resolving node version 6.11.0...
       Downloading and installing node 6.11.0...
       npm 3.10.10 already installed with node
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules (exists - skipping)
       - bower_components (not cached - skipping)
-----> Building dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       body-parser@1.17.2 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/body-parser
       bytes@2.4.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/bytes
       content-type@1.0.2 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/content-type
       debug@2.6.7 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/body-parser/node_modules/debug
       ms@2.0.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/ms
       depd@1.1.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/depd
       http-errors@1.6.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/http-errors
       inherits@2.0.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/inherits
       setprototypeof@1.0.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/setprototypeof
       statuses@1.3.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/statuses
       iconv-lite@0.4.15 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/iconv-lite
       on-finished@2.3.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/on-finished
       ee-first@1.1.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/ee-first
       qs@6.4.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/qs
       raw-body@2.2.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/raw-body
       unpipe@1.0.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/unpipe
       type-is@1.6.15 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/type-is
       media-typer@0.3.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/media-typer
       mime-types@2.1.16 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/mime-types
       mime-db@1.29.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/mime-db
       cookie-parser@1.4.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/cookie-parser
       cookie@0.3.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/cookie
       cookie-signature@1.0.6 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/cookie-signature
       debug@2.6.8 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/debug
       ejs@2.5.6 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/ejs
       express@4.15.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/express
       accepts@1.3.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/accepts
       negotiator@0.6.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/negotiator
       array-flatten@1.1.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/array-flatten
       content-disposition@0.5.2 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/content-disposition
       debug@2.6.7 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/express/node_modules/debug
       encodeurl@1.0.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/encodeurl
       escape-html@1.0.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/escape-html
       etag@1.8.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/etag
       finalhandler@1.0.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/finalhandler
       debug@2.6.7 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/finalhandler/node_modules/debug
       parseurl@1.3.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/parseurl
       fresh@0.5.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/fresh
       merge-descriptors@1.0.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/merge-descriptors
       methods@1.1.2 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/methods
       path-to-regexp@0.1.7 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/path-to-regexp
       proxy-addr@1.1.4 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/proxy-addr
       forwarded@0.1.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/forwarded
       ipaddr.js@1.3.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/ipaddr.js
       range-parser@1.2.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/range-parser
       send@0.15.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/send
       debug@2.6.7 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/send/node_modules/debug
       destroy@1.0.4 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/destroy
       mime@1.3.4 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/mime
       serve-static@1.12.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/serve-static
       utils-merge@1.0.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/utils-merge
       vary@1.1.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/vary
       morgan@1.8.2 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/morgan
       basic-auth@1.1.0 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/basic-auth
       on-headers@1.0.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/on-headers
       serve-favicon@2.4.3 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/serve-favicon
       safe-buffer@5.0.1 /tmp/build_af04dccbe55a579f742b63b9b9775aa9/node_modules/safe-buffer
       Installing any new modules (package.json)
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 14.9M
-----> Launching...
       Released v4
       https://tom-tam.herokuapp.com/ deployed to Heroku

1 个答案:

答案 0 :(得分:0)

当您检查heroku桌面时,在应用的“概述”标签中,是否显示您的上一次构建成功或失败?

enter image description here

当您查看日志时,是否显示该应用已启动并正在运行?

enter image description here

- 根据评论讨论进行编辑 -

module.exports = app;

之前将此添加到app.js

const PORT = process.env.PORT || 8000; app.listen(PORT, () => { console.log(`App listening on port ${PORT}!`); });