[英]Node-config won't use variables from custom-environment-variables.json in Heroku
[英]heroku config:push not adding environment variables
嗨,我從heroku教程中完成了以下操作。
heroku plugins:install git://github.com/ddollar/heroku-config.git
heroku config:push --overwrite
我的.env
文件在項目目錄的根目錄中
GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return
GOOGLE_REALM = http://example.herokuapp.com/
我還將設置--overwrite標志作為此答案的建議
但是,當我回顯我的heroku config
它仍然為空!
問題是您的.env文件中的空格。 刪除“ =”兩側的空格,插件將起作用。
更改:
GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return
GOOGLE_REALM = http://example.herokuapp.com/
至:
GOOGLE_RETURN_URL=http://example.herokuapp.com/auth/google/return
GOOGLE_REALM=http://example.herokuapp.com/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.