gpt4 book ai didi

node.js - 这些 Heroku 日志出了什么问题

转载 作者:太空宇宙 更新时间:2023-11-03 23:05:10 25 4
gpt4 key购买 nike

所以这个应用程序在我的 local:3000 上运行良好,并且我可以让它在 heroku 上运行良好。问题是我不想跟踪 api key 。因此,我将它们从捕获中删除,然后尝试重新上传应用程序,但失败了。如果我不需要通过 git hub 自动部署来不断更新应用程序,那么这不会成为问题。但是当我创建并更新到我的 github 版本时,.gitignore 文件使用我的 api key 取消跟踪我的 json 文件,应用程序崩溃了。请帮忙谢谢

`remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version (latest stable) via semver.io...
remote: Downloading and installing node 5.10.0...
remote: Using default npm version: 3.8.3
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (new runtime signature)
remote:
remote: -----> Building dependencies
remote: Pruning any extraneous modules
remote: Installing node modules (package.json)
remote: appname@0.0.0 /tmp/build_5014610d3b523f7ab52c0fa545ba8ec1
remote: ├─┬ body-parser@1.15.0
remote: │ ├── bytes@2.2.0
remote: │ ├── content-type@1.0.1
remote: │ ├─┬ debug@2.2.0
remote: │ │ └── ms@0.7.1
remote: │ ├── depd@1.1.0
remote: │ ├─┬ http-errors@1.4.0
remote: │ │ ├── inherits@2.0.1
remote: │ │ └── statuses@1.2.1
remote: │ ├── iconv-lite@0.4.13
remote: │ ├─┬ on-finished@2.3.0
remote: │ │ └── ee-first@1.1.1
remote: │ ├── qs@6.1.0
remote: │ ├─┬ raw-body@2.1.6
remote: │ │ ├── bytes@2.3.0
remote: │ │ └── unpipe@1.0.0
remote: │ └─┬ type-is@1.6.12
remote: │ ├── media-typer@0.3.0
remote: │ └─┬ mime-types@2.1.10
remote: │ └── mime-db@1.22.0
remote: ├── ejs@2.4.1
remote: ├─┬ express@4.13.4
remote: │ ├─┬ accepts@1.2.13
remote: │ │ └── negotiator@0.5.3
remote: │ ├── array-flatten@1.1.1
remote: │ ├── content-disposition@0.5.1
remote: │ ├── cookie@0.1.5
remote: │ ├── cookie-signature@1.0.6
remote: │ ├── escape-html@1.0.3
remote: │ ├── etag@1.7.0
remote: │ ├── finalhandler@0.4.1
remote: │ ├── fresh@0.3.0
remote: │ ├── merge-descriptors@1.0.1
remote: │ ├── methods@1.1.2
remote: │ ├── parseurl@1.3.1
remote: │ ├── path-to-regexp@0.1.7
remote: │ ├─┬ proxy-addr@1.0.10
remote: │ │ ├── forwarded@0.1.0
remote: │ │ └── ipaddr.js@1.0.5
remote: │ ├── qs@4.0.0
remote: │ ├── range-parser@1.0.3
remote: │ ├─┬ send@0.13.1
remote: │ │ ├── destroy@1.0.4
remote: │ │ └── http-errors@1.3.1
remote: │ ├── serve-static@1.10.2
remote: │ ├── utils-merge@1.0.0
remote: │ └── vary@1.0.1
remote: └─┬ sendgrid@1.9.2
remote: ├── lodash@3.10.1
remote: ├── mime@1.3.4
remote: ├─┬ request@2.70.0
remote: │ ├── aws-sign2@0.6.0
remote: │ ├─┬ aws4@1.3.2
remote: │ │ └─┬ lru-cache@4.0.1
remote: │ │ ├── pseudomap@1.0.2
remote: │ │ └── yallist@2.0.0
remote: │ ├─┬ bl@1.1.2
remote: │ │ └─┬ readable-stream@2.0.6
remote: │ │ ├── core-util-is@1.0.2
remote: │ │ ├── isarray@1.0.0
remote: │ │ ├── process-nextick-args@1.0.6
remote: │ │ ├── string_decoder@0.10.31
remote: │ │ └── util-deprecate@1.0.2
remote: │ ├── caseless@0.11.0
remote: │ ├─┬ combined-stream@1.0.5
remote: │ │ └── delayed-stream@1.0.0
remote: │ ├── extend@3.0.0
remote: │ ├── forever-agent@0.6.1
remote: │ ├─┬ form-data@1.0.0-rc4
remote: │ │ └── async@1.5.2
remote: │ ├─┬ har-validator@2.0.6
remote: │ │ ├─┬ chalk@1.1.3
remote: │ │ │ ├── ansi-styles@2.2.1
remote: │ │ │ ├── escape-string-regexp@1.0.5
remote: │ │ │ ├─┬ has-ansi@2.0.0
remote: │ │ │ │ └── ansi-regex@2.0.0
remote: │ │ │ ├── strip-ansi@3.0.1
remote: │ │ │ └── supports-color@2.0.0
remote: │ │ ├─┬ commander@2.9.0
remote: │ │ │ └── graceful-readlink@1.0.1
remote: │ │ ├─┬ is-my-json-valid@2.13.1
remote: │ │ │ ├── generate-function@2.0.0
remote: │ │ │ ├─┬ generate-object-property@1.2.0
remote: │ │ │ │ └── is-property@1.0.2
remote: │ │ │ ├── jsonpointer@2.0.0
remote: │ │ │ └── xtend@4.0.1
remote: │ │ └─┬ pinkie-promise@2.0.0
remote: │ │ └── pinkie@2.0.4
remote: │ ├─┬ hawk@3.1.3
remote: │ │ ├── boom@2.10.1
remote: │ │ ├── cryptiles@2.0.5
remote: │ │ ├── hoek@2.16.3
remote: │ │ └── sntp@1.0.9
remote: │ ├─┬ http-signature@1.1.1
remote: │ │ ├── assert-plus@0.2.0
remote: │ │ ├─┬ jsprim@1.2.2
remote: │ │ │ ├── extsprintf@1.0.2
remote: │ │ │ ├── json-schema@0.2.2
remote: │ │ │ └── verror@1.3.6
remote: │ │ └─┬ sshpk@1.7.4
remote: │ │ ├── asn1@0.2.3
remote: │ │ ├─┬ dashdash@1.13.0
remote: │ │ │ └── assert-plus@1.0.0
remote: │ │ ├── ecc-jsbn@0.1.1
remote: │ │ ├── jodid25519@1.0.2
remote: │ │ ├── jsbn@0.1.0
remote: │ │ └── tweetnacl@0.14.3
remote: │ ├── is-typedarray@1.0.0
remote: │ ├── isstream@0.1.2
remote: │ ├── json-stringify-safe@5.0.1
remote: │ ├── node-uuid@1.4.7
remote: │ ├── oauth-sign@0.8.1
remote: │ ├── stringstream@0.0.5
remote: │ ├── tough-cookie@2.2.2
remote: │ └── tunnel-agent@0.4.2
remote: └── smtpapi@1.2.0
remote:
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules
remote: - bower_components (nothing to cache)
remote:
remote: -----> Build succeeded!
remote: ├── body-parser@1.15.0
remote: ├── ejs@2.4.1
remote: ├── express@4.13.4
remote: └── sendgrid@1.9.2
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 17.2M
remote: -----> Launching...
remote: Released v3
remote: https://safe-brook-78904.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.`

最佳答案

如果您不想将私有(private)信息存储在存储库中,则应该通过环境变量提供这些值。

考虑在应用程序中使用 process.env,并提供 Heroku 所说的 Config Vars在他们的最后。

关于node.js - 这些 Heroku 日志出了什么问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36488252/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com