我使用 ejs 构建了一个简单的 node.js 应用程序,并成功将其部署到 Heroku, 但是当我打开应用程序时,它显示“应用程序错误”消息并要求检查构建日志,我找不到问题所在。请帮忙!
我尝试在 Heroku 的配置设置中手动添加“端口 3000”,将启动脚本添加到 package.json,但这些都不起作用。
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.17.3...
Using default npm version: 6.14.13
-----> Restoring cache
- node_modules is checked into source control and cannot be cached
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> nodemon@2.0.12 postinstall /tmp/build_3cfc52d8/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
dompurify@2.3.0 /tmp/build_3cfc52d8/node_modules/dompurify
ejs@3.1.6 /tmp/build_3cfc52d8/node_modules/ejs
jake@10.8.2 /tmp/build_3cfc52d8/node_modules/jake
filelist@1.0.2 /tmp/build_3cfc52d8/node_modules/filelist
minimatch@3.0.4 /tmp/build_3cfc52d8/node_modules/minimatch
brace-expansion@1.1.11 /tmp/build_3cfc52d8/node_modules/brace-expansion
balanced-match@1.0.2 /tmp/build_3cfc52d8/node_modules/balanced-match
concat-map@0.0.1 /tmp/build_3cfc52d8/node_modules/concat-map
chalk@2.4.2 /tmp/build_3cfc52d8/node_modules/chalk
ansi-styles@3.2.1 /tmp/build_3cfc52d8/node_modules/ansi-styles
color-convert@1.9.3 /tmp/build_3cfc52d8/node_modules/color-convert
color-name@1.1.3 /tmp/build_3cfc52d8/node_modules/color-name
escape-string-regexp@1.0.5 /tmp/build_3cfc52d8/node_modules/escape-string-regexp
supports-color@5.5.0 /tmp/build_3cfc52d8/node_modules/supports-color
has-flag@3.0.0 /tmp/build_3cfc52d8/node_modules/has-flag
async@0.9.2 /tmp/build_3cfc52d8/node_modules/async
express@4.17.1 /tmp/build_3cfc52d8/node_modules/express
accepts@1.3.7 /tmp/build_3cfc52d8/node_modules/accepts
mime-types@2.1.31 /tmp/build_3cfc52d8/node_modules/mime-types
mime-db@1.48.0 /tmp/build_3cfc52d8/node_modules/mime-db
negotiator@0.6.2 /tmp/build_3cfc52d8/node_modules/negotiator
array-flatten@1.1.1 /tmp/build_3cfc52d8/node_modules/array-flatten
body-parser@1.19.0 /tmp/build_3cfc52d8/node_modules/body-parser
bytes@3.1.0 /tmp/build_3cfc52d8/node_modules/bytes
content-type@1.0.4 /tmp/build_3cfc52d8/node_modules/content-type
debug@2.6.9 /tmp/build_3cfc52d8/node_modules/debug
ms@2.0.0 /tmp/build_3cfc52d8/node_modules/ms
depd@1.1.2 /tmp/build_3cfc52d8/node_modules/depd
http-errors@1.7.2 /tmp/build_3cfc52d8/node_modules/http-errors
inherits@2.0.3 /tmp/build_3cfc52d8/node_modules/inherits
setprototypeof@1.1.1 /tmp/build_3cfc52d8/node_modules/setprototypeof
statuses@1.5.0 /tmp/build_3cfc52d8/node_modules/statuses
toidentifier@1.0.0 /tmp/build_3cfc52d8/node_modules/toidentifier
iconv-lite@0.4.24 /tmp/build_3cfc52d8/node_modules/iconv-lite
safer-buffer@2.1.2 /tmp/build_3cfc52d8/node_modules/safer-buffer
on-finished@2.3.0 /tmp/build_3cfc52d8/node_modules/on-finished
ee-first@1.1.1 /tmp/build_3cfc52d8/node_modules/ee-first
qs@6.7.0 /tmp/build_3cfc52d8/node_modules/qs
raw-body@2.4.0 /tmp/build_3cfc52d8/node_modules/raw-body
unpipe@1.0.0 /tmp/build_3cfc52d8/node_modules/unpipe
type-is@1.6.18 /tmp/build_3cfc52d8/node_modules/type-is
media-typer@0.3.0 /tmp/build_3cfc52d8/node_modules/media-typer
content-disposition@0.5.3 /tmp/build_3cfc52d8/node_modules/content-disposition
safe-buffer@5.1.2 /tmp/build_3cfc52d8/node_modules/safe-buffer
cookie@0.4.0 /tmp/build_3cfc52d8/node_modules/cookie
cookie-signature@1.0.6 /tmp/build_3cfc52d8/node_modules/cookie-signature
encodeurl@1.0.2 /tmp/build_3cfc52d8/node_modules/encodeurl
escape-html@1.0.3 /tmp/build_3cfc52d8/node_modules/escape-html
etag@1.8.1 /tmp/build_3cfc52d8/node_modules/etag
finalhandler@1.1.2 /tmp/build_3cfc52d8/node_modules/finalhandler
parseurl@1.3.3 /tmp/build_3cfc52d8/node_modules/parseurl
fresh@0.5.2 /tmp/build_3cfc52d8/node_modules/fresh
merge-descriptors@1.0.1 /tmp/build_3cfc52d8/node_modules/merge-descriptors
methods@1.1.2 /tmp/build_3cfc52d8/node_modules/methods
path-to-regexp@0.1.7 /tmp/build_3cfc52d8/node_modules/path-to-regexp
proxy-addr@2.0.7 /tmp/build_3cfc52d8/node_modules/proxy-addr
forwarded@0.2.0 /tmp/build_3cfc52d8/node_modules/forwarded
ipaddr.js@1.9.1 /tmp/build_3cfc52d8/node_modules/ipaddr.js
range-parser@1.2.1 /tmp/build_3cfc52d8/node_modules/range-parser
send@0.17.1 /tmp/build_3cfc52d8/node_modules/send
destroy@1.0.4 /tmp/build_3cfc52d8/node_modules/destroy
mime@1.6.0 /tmp/build_3cfc52d8/node_modules/mime
ms@2.1.1 /tmp/build_3cfc52d8/node_modules/send/node_modules/ms
serve-static@1.14.1 /tmp/build_3cfc52d8/node_modules/serve-static
utils-merge@1.0.1 /tmp/build_3cfc52d8/node_modules/utils-merge
vary@1.1.2 /tmp/build_3cfc52d8/node_modules/vary
jsdom@16.6.0 /tmp/build_3cfc52d8/node_modules/jsdom
abab@2.0.5 /tmp/build_3cfc52d8/node_modules/abab
acorn@8.4.1 /tmp/build_3cfc52d8/node_modules/acorn
acorn-globals@6.0.0 /tmp/build_3cfc52d8/node_modules/acorn-globals
acorn@7.4.1 /tmp/build_3cfc52d8/node_modules/acorn-globals/node_modules/acorn
acorn-walk@7.2.0 /tmp/build_3cfc52d8/node_modules/acorn-walk
cssom@0.4.4 /tmp/build_3cfc52d8/node_modules/cssom
cssstyle@2.3.0 /tmp/build_3cfc52d8/node_modules/cssstyle
cssom@0.3.8 /tmp/build_3cfc52d8/node_modules/cssstyle/node_modules/cssom
data-urls@2.0.0 /tmp/build_3cfc52d8/node_modules/data-urls
whatwg-mimetype@2.3.0 /tmp/build_3cfc52d8/node_modules/whatwg-mimetype
whatwg-url@8.7.0 /tmp/build_3cfc52d8/node_modules/whatwg-url
lodash@4.17.21 /tmp/build_3cfc52d8/node_modules/lodash
tr46@2.1.0 /tmp/build_3cfc52d8/node_modules/tr46
punycode@2.1.1 /tmp/build_3cfc52d8/node_modules/punycode
webidl-conversions@6.1.0 /tmp/build_3cfc52d8/node_modules/webidl-conversions
decimal.js@10.3.1 /tmp/build_3cfc52d8/node_modules/decimal.js
domexception@2.0.1 /tmp/build_3cfc52d8/node_modules/domexception
webidl-conversions@5.0.0 /tmp/build_3cfc52d8/node_modules/domexception/node_modules/webidl-conversions
escodegen@2.0.0 /tmp/build_3cfc52d8/node_modules/escodegen
estraverse@5.2.0 /tmp/build_3cfc52d8/node_modules/estraverse
esutils@2.0.3 /tmp/build_3cfc52d8/node_modules/esutils
esprima@4.0.1 /tmp/build_3cfc52d8/node_modules/esprima
optionator@0.8.3 /tmp/build_3cfc52d8/node_modules/optionator
prelude-ls@1.1.2 /tmp/build_3cfc52d8/node_modules/prelude-ls
deep-is@0.1.3 /tmp/build_3cfc52d8/node_modules/deep-is
word-wrap@1.2.3 /tmp/build_3cfc52d8/node_modules/word-wrap
type-check@0.3.2 /tmp/build_3cfc52d8/node_modules/type-check
levn@0.3.0 /tmp/build_3cfc52d8/node_modules/levn
fast-levenshtein@2.0.6 /tmp/build_3cfc52d8/node_modules/fast-levenshtein
form-data@3.0.1 /tmp/build_3cfc52d8/node_modules/form-data
asynckit@0.4.0 /tmp/build_3cfc52d8/node_modules/asynckit
combined-stream@1.0.8 /tmp/build_3cfc52d8/node_modules/combined-stream
delayed-stream@1.0.0 /tmp/build_3cfc52d8/node_modules/delayed-stream
html-encoding-sniffer@2.0.1 /tmp/build_3cfc52d8/node_modules/html-encoding-sniffer
whatwg-encoding@1.0.5 /tmp/build_3cfc52d8/node_modules/whatwg-encoding
http-proxy-agent@4.0.1 /tmp/build_3cfc52d8/node_modules/http-proxy-agent
@tootallnate/once@1.1.2 /tmp/build_3cfc52d8/node_modules/@tootallnate/once
agent-base@6.0.2 /tmp/build_3cfc52d8/node_modules/agent-base
debug@4.3.2 /tmp/build_3cfc52d8/node_modules/agent-base/node_modules/debug
ms@2.1.2 /tmp/build_3cfc52d8/node_modules/agent-base/node_modules/ms
debug@4.3.2 /tmp/build_3cfc52d8/node_modules/http-proxy-agent/node_modules/debug
ms@2.1.2 /tmp/build_3cfc52d8/node_modules/http-proxy-agent/node_modules/ms
https-proxy-agent@5.0.0 /tmp/build_3cfc52d8/node_modules/https-proxy-agent
debug@4.3.2 /tmp/build_3cfc52d8/node_modules/https-proxy-agent/node_modules/debug
ms@2.1.2 /tmp/build_3cfc52d8/node_modules/https-proxy-agent/node_modules/ms
is-potential-custom-element-name@1.0.1 /tmp/build_3cfc52d8/node_modules/is-potential-custom-element-name
nwsapi@2.2.0 /tmp/build_3cfc52d8/node_modules/nwsapi
parse5@6.0.1 /tmp/build_3cfc52d8/node_modules/parse5
saxes@5.0.1 /tmp/build_3cfc52d8/node_modules/saxes
xmlchars@2.2.0 /tmp/build_3cfc52d8/node_modules/xmlchars
symbol-tree@3.2.4 /tmp/build_3cfc52d8/node_modules/symbol-tree
tough-cookie@4.0.0 /tmp/build_3cfc52d8/node_modules/tough-cookie
psl@1.8.0 /tmp/build_3cfc52d8/node_modules/psl
universalify@0.1.2 /tmp/build_3cfc52d8/node_modules/universalify
w3c-hr-time@1.0.2 /tmp/build_3cfc52d8/node_modules/w3c-hr-time
browser-process-hrtime@1.0.0 /tmp/build_3cfc52d8/node_modules/browser-process-hrtime
w3c-xmlserializer@2.0.0 /tmp/build_3cfc52d8/node_modules/w3c-xmlserializer
xml-name-validator@3.0.0 /tmp/build_3cfc52d8/node_modules/xml-name-validator
ws@7.5.3 /tmp/build_3cfc52d8/node_modules/ws
marked@2.1.3 /tmp/build_3cfc52d8/node_modules/marked
method-override@3.0.0 /tmp/build_3cfc52d8/node_modules/method-override
debug@3.1.0 /tmp/build_3cfc52d8/node_modules/method-override/node_modules/debug
mongoose@5.13.2 /tmp/build_3cfc52d8/node_modules/mongoose
@types/mongodb@3.6.20 /tmp/build_3cfc52d8/node_modules/@types/mongodb
@types/bson@4.0.4 /tmp/build_3cfc52d8/node_modules/@types/bson
@types/node@15.14.2 /tmp/build_3cfc52d8/node_modules/@types/node
bson@1.1.6 /tmp/build_3cfc52d8/node_modules/bson
kareem@2.3.2 /tmp/build_3cfc52d8/node_modules/kareem
mongodb@3.6.8 /tmp/build_3cfc52d8/node_modules/mongodb
bl@2.2.1 /tmp/build_3cfc52d8/node_modules/bl
readable-stream@2.3.7 /tmp/build_3cfc52d8/node_modules/readable-stream
core-util-is@1.0.2 /tmp/build_3cfc52d8/node_modules/core-util-is
isarray@1.0.0 /tmp/build_3cfc52d8/node_modules/isarray
process-nextick-args@2.0.1 /tmp/build_3cfc52d8/node_modules/process-nextick-args
string_decoder@1.1.1 /tmp/build_3cfc52d8/node_modules/string_decoder
util-deprecate@1.0.2 /tmp/build_3cfc52d8/node_modules/util-deprecate
denque@1.5.0 /tmp/build_3cfc52d8/node_modules/denque
optional-require@1.0.3 /tmp/build_3cfc52d8/node_modules/optional-require
mongoose-legacy-pluralize@1.0.2 /tmp/build_3cfc52d8/node_modules/mongoose-legacy-pluralize
mpath@0.8.3 /tmp/build_3cfc52d8/node_modules/mpath
mquery@3.2.5 /tmp/build_3cfc52d8/node_modules/mquery
bluebird@3.5.1 /tmp/build_3cfc52d8/node_modules/bluebird
debug@3.1.0 /tmp/build_3cfc52d8/node_modules/mquery/node_modules/debug
regexp-clone@1.0.0 /tmp/build_3cfc52d8/node_modules/regexp-clone
sliced@1.0.1 /tmp/build_3cfc52d8/node_modules/sliced
ms@2.1.2 /tmp/build_3cfc52d8/node_modules/mongoose/node_modules/ms
safe-buffer@5.2.1 /tmp/build_3cfc52d8/node_modules/mongoose/node_modules/safe-buffer
sift@13.5.2 /tmp/build_3cfc52d8/node_modules/sift
slugify@1.5.3 /tmp/build_3cfc52d8/node_modules/slugify
@sindresorhus/is@0.14.0 /tmp/build_3cfc52d8/node_modules/@sindresorhus/is
@szmarczak/http-timer@1.1.2 /tmp/build_3cfc52d8/node_modules/@szmarczak/http-timer
defer-to-connect@1.1.3 /tmp/build_3cfc52d8/node_modules/defer-to-connect
abbrev@1.1.1 /tmp/build_3cfc52d8/node_modules/abbrev
ansi-regex@5.0.0 /tmp/build_3cfc52d8/node_modules/ansi-regex
anymatch@3.1.2 /tmp/build_3cfc52d8/node_modules/anymatch
normalize-path@3.0.0 /tmp/build_3cfc52d8/node_modules/normalize-path
picomatch@2.3.0 /tmp/build_3cfc52d8/node_modules/picomatch
binary-extensions@2.2.0 /tmp/build_3cfc52d8/node_modules/binary-extensions
braces@3.0.2 /tmp/build_3cfc52d8/node_modules/braces
fill-range@7.0.1 /tmp/build_3cfc52d8/node_modules/fill-range
to-regex-range@5.0.1 /tmp/build_3cfc52d8/node_modules/to-regex-range
is-number@7.0.0 /tmp/build_3cfc52d8/node_modules/is-number
camelcase@5.3.1 /tmp/build_3cfc52d8/node_modules/camelcase
chokidar@3.5.2 /tmp/build_3cfc52d8/node_modules/chokidar
glob-parent@5.1.2 /tmp/build_3cfc52d8/node_modules/glob-parent
is-glob@4.0.1 /tmp/build_3cfc52d8/node_modules/is-glob
is-extglob@2.1.1 /tmp/build_3cfc52d8/node_modules/is-extglob
is-binary-path@2.1.0 /tmp/build_3cfc52d8/node_modules/is-binary-path
readdirp@3.6.0 /tmp/build_3cfc52d8/node_modules/readdirp
ci-info@2.0.0 /tmp/build_3cfc52d8/node_modules/ci-info
cli-boxes@2.2.1 /tmp/build_3cfc52d8/node_modules/cli-boxes
clone-response@1.0.2 /tmp/build_3cfc52d8/node_modules/clone-response
mimic-response@1.0.1 /tmp/build_3cfc52d8/node_modules/mimic-response
configstore@5.0.1 /tmp/build_3cfc52d8/node_modules/configstore
dot-prop@5.3.0 /tmp/build_3cfc52d8/node_modules/dot-prop
is-obj@2.0.0 /tmp/build_3cfc52d8/node_modules/is-obj
graceful-fs@4.2.6 /tmp/build_3cfc52d8/node_modules/graceful-fs
make-dir@3.1.0 /tmp/build_3cfc52d8/node_modules/make-dir
semver@6.3.0 /tmp/build_3cfc52d8/node_modules/make-dir/node_modules/semver
unique-string@2.0.0 /tmp/build_3cfc52d8/node_modules/unique-string
crypto-random-string@2.0.0 /tmp/build_3cfc52d8/node_modules/crypto-random-string
write-file-atomic@3.0.3 /tmp/build_3cfc52d8/node_modules/write-file-atomic
imurmurhash@0.1.4 /tmp/build_3cfc52d8/node_modules/imurmurhash
is-typedarray@1.0.0 /tmp/build_3cfc52d8/node_modules/is-typedarray
signal-exit@3.0.3 /tmp/build_3cfc52d8/node_modules/signal-exit
typedarray-to-buffer@3.1.5 /tmp/build_3cfc52d8/node_modules/typedarray-to-buffer
xdg-basedir@4.0.0 /tmp/build_3cfc52d8/node_modules/xdg-basedir
decompress-response@3.3.0 /tmp/build_3cfc52d8/node_modules/decompress-response
deep-extend@0.6.0 /tmp/build_3cfc52d8/node_modules/deep-extend
duplexer3@0.1.4 /tmp/build_3cfc52d8/node_modules/duplexer3
emoji-regex@8.0.0 /tmp/build_3cfc52d8/node_modules/emoji-regex
end-of-stream@1.4.4 /tmp/build_3cfc52d8/node_modules/end-of-stream
once@1.4.0 /tmp/build_3cfc52d8/node_modules/once
wrappy@1.0.2 /tmp/build_3cfc52d8/node_modules/wrappy
escape-goat@2.1.1 /tmp/build_3cfc52d8/node_modules/escape-goat
fsevents@2.3.2 /tmp/build_3cfc52d8/node_modules/fsevents
get-stream@4.1.0 /tmp/build_3cfc52d8/node_modules/get-stream
pump@3.0.0 /tmp/build_3cfc52d8/node_modules/pump
global-dirs@2.1.0 /tmp/build_3cfc52d8/node_modules/global-dirs
ini@1.3.7 /tmp/build_3cfc52d8/node_modules/ini
got@9.6.0 /tmp/build_3cfc52d8/node_modules/got
cacheable-request@6.1.0 /tmp/build_3cfc52d8/node_modules/cacheable-request
get-stream@5.2.0 /tmp/build_3cfc52d8/node_modules/cacheable-request/node_modules/get-stream
http-cache-semantics@4.1.0 /tmp/build_3cfc52d8/node_modules/http-cache-semantics
keyv@3.1.0 /tmp/build_3cfc52d8/node_modules/keyv
json-buffer@3.0.0 /tmp/build_3cfc52d8/node_modules/json-buffer
lowercase-keys@2.0.0 /tmp/build_3cfc52d8/node_modules/cacheable-request/node_modules/lowercase-keys
normalize-url@4.5.1 /tmp/build_3cfc52d8/node_modules/normalize-url
responselike@1.0.2 /tmp/build_3cfc52d8/node_modules/responselike
lowercase-keys@1.0.1 /tmp/build_3cfc52d8/node_modules/lowercase-keys
p-cancelable@1.1.0 /tmp/build_3cfc52d8/node_modules/p-cancelable
to-readable-stream@1.0.0 /tmp/build_3cfc52d8/node_modules/to-readable-stream
url-parse-lax@3.0.0 /tmp/build_3cfc52d8/node_modules/url-parse-lax
prepend-http@2.0.0 /tmp/build_3cfc52d8/node_modules/prepend-http
has-yarn@2.1.0 /tmp/build_3cfc52d8/node_modules/has-yarn
ignore-by-default@1.0.1 /tmp/build_3cfc52d8/node_modules/ignore-by-default
import-lazy@2.1.0 /tmp/build_3cfc52d8/node_modules/import-lazy
is-fullwidth-code-point@3.0.0 /tmp/build_3cfc52d8/node_modules/is-fullwidth-code-point
is-installed-globally@0.3.2 /tmp/build_3cfc52d8/node_modules/is-installed-globally
is-path-inside@3.0.3 /tmp/build_3cfc52d8/node_modules/is-path-inside
is-npm@4.0.0 /tmp/build_3cfc52d8/node_modules/is-npm
is-yarn-global@0.3.0 /tmp/build_3cfc52d8/node_modules/is-yarn-global
latest-version@5.1.0 /tmp/build_3cfc52d8/node_modules/latest-version
package-json@6.5.0 /tmp/build_3cfc52d8/node_modules/package-json
registry-auth-token@4.2.1 /tmp/build_3cfc52d8/node_modules/registry-auth-token
rc@1.2.8 /tmp/build_3cfc52d8/node_modules/rc
minimist@1.2.5 /tmp/build_3cfc52d8/node_modules/minimist
strip-json-comments@2.0.1 /tmp/build_3cfc52d8/node_modules/strip-json-comments
registry-url@5.1.0 /tmp/build_3cfc52d8/node_modules/registry-url
semver@6.3.0 /tmp/build_3cfc52d8/node_modules/package-json/node_modules/semver
memory-pager@1.5.0 /tmp/build_3cfc52d8/node_modules/memory-pager
pstree.remy@1.1.8 /tmp/build_3cfc52d8/node_modules/pstree.remy
pupa@2.1.1 /tmp/build_3cfc52d8/node_modules/pupa
saslprep@1.0.3 /tmp/build_3cfc52d8/node_modules/saslprep
sparse-bitfield@3.0.3 /tmp/build_3cfc52d8/node_modules/sparse-bitfield
source-map@0.6.1 /tmp/build_3cfc52d8/node_modules/source-map
string-width@4.2.2 /tmp/build_3cfc52d8/node_modules/string-width
strip-ansi@6.0.0 /tmp/build_3cfc52d8/node_modules/strip-ansi
term-size@2.2.1 /tmp/build_3cfc52d8/node_modules/term-size
type-fest@0.8.1 /tmp/build_3cfc52d8/node_modules/type-fest
undefsafe@2.0.3 /tmp/build_3cfc52d8/node_modules/undefsafe
widest-line@3.1.0 /tmp/build_3cfc52d8/node_modules/widest-line
is-ci@2.0.0 /tmp/build_3cfc52d8/node_modules/is-ci
nopt@1.0.10 /tmp/build_3cfc52d8/node_modules/nopt
semver@5.7.1 /tmp/build_3cfc52d8/node_modules/semver
touch@3.1.0 /tmp/build_3cfc52d8/node_modules/touch
ansi-align@3.0.0 /tmp/build_3cfc52d8/node_modules/ansi-align
string-width@3.1.0 /tmp/build_3cfc52d8/node_modules/ansi-align/node_modules/string-width
emoji-regex@7.0.3 /tmp/build_3cfc52d8/node_modules/ansi-align/node_modules/emoji-regex
is-fullwidth-code-point@2.0.0 /tmp/build_3cfc52d8/node_modules/ansi-align/node_modules/is-fullwidth-code-point
strip-ansi@5.2.0 /tmp/build_3cfc52d8/node_modules/ansi-align/node_modules/strip-ansi
ansi-regex@4.1.0 /tmp/build_3cfc52d8/node_modules/ansi-align/node_modules/ansi-regex
boxen@4.2.0 /tmp/build_3cfc52d8/node_modules/boxen
chalk@3.0.0 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/chalk
ansi-styles@4.3.0 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/ansi-styles
color-convert@2.0.1 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/color-convert
color-name@1.1.4 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/color-name
supports-color@7.2.0 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/supports-color
has-flag@4.0.0 /tmp/build_3cfc52d8/node_modules/boxen/node_modules/has-flag
update-notifier@4.1.3 /tmp/build_3cfc52d8/node_modules/update-notifier
chalk@3.0.0 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/chalk
ansi-styles@4.3.0 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/ansi-styles
color-convert@2.0.1 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/color-convert
color-name@1.1.4 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/color-name
supports-color@7.2.0 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/supports-color
has-flag@4.0.0 /tmp/build_3cfc52d8/node_modules/update-notifier/node_modules/has-flag
semver-diff@3.1.1 /tmp/build_3cfc52d8/node_modules/semver-diff
semver@6.3.0 /tmp/build_3cfc52d8/node_modules/semver-diff/node_modules/semver
nodemon@2.0.12 /tmp/build_3cfc52d8/node_modules/nodemon
debug@3.2.7 /tmp/build_3cfc52d8/node_modules/nodemon/node_modules/debug
ms@2.1.3 /tmp/build_3cfc52d8/node_modules/nodemon/node_modules/ms
Installing any new modules (package.json)
> nodemon@2.0.12 postinstall /tmp/build_3cfc52d8/node_modules/nodemon
> node bin/postinstall || exit 0
updated 277 packages and audited 278 packages in 9.566s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build
-----> Caching build
- node_modules
-----> Pruning devDependencies
removed 117 packages and audited 160 packages in 2.326s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build succeeded!
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 37.1M
-----> Launching...
Released v9
https://sops-pops-my-blog.herokuapp.com/ deployed to Heroku
const express = require('express')
const mongoose = require('mongoose')
const Article = require('./models/article')
const articleRouter = require('./routes/articles')
const methodOverride = require('method-override')
const port = process.env.PORT || 3000
const app = express()
mongoose.connect('mongodb://localhost/blog', {
useNewUrlParser: true, useUnifiedTopology: true
})
app.set('view engine', 'ejs')
app.use(express.urlencoded({ extended: false }))
app.use(methodOverride('_method'))
app.get('/', async (req, res) => {
const articles = await Article.find().sort({
createdAt: 'desc'
})
res.render('./articles/index', { articles: articles })
})
app.use('/articles', articleRouter)
app.listen(port)
{
"name": "my-blog",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node server.js",
"devStart": "nodemon server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"dompurify": "^2.3.0",
"ejs": "^3.1.6",
"express": "^4.17.1",
"jsdom": "^16.6.0",
"marked": "^2.1.3",
"method-override": "^3.0.0",
"mongoose": "^5.13.2",
"slugify": "^1.5.3"
},
"devDependencies": {
"nodemon": "^2.0.12"
}
}