Heroku本地[WARN]找不到ENV文件 [英] Heroku Local [WARN] No ENV file found
问题描述
当我尝试运行时
heroku本地
我的控制台显示我:
[WARN]没有找到ENV文件
我该如何解决这个问题?
干杯,
添加 .env
文件。这些文件包含本地设置与heroku环境不同的本地 VARS
。但是,如果一切运行良好,您可以忽略该警告,或执行 touch .env
。
您可以也可以通过创建 Procfile.local
文件并运行 heroku local -f Procfile.local
来区分,以强制使用本地启动脚本。
我刚刚阅读: https:// devcenter。 heroku.com/articles/heroku-local 。这解释了一切。
对于一个工作示例: http:// github的.com / halcwb / GenUnitApp.git 。如果安装了heroku工具栏,您可以在mac或linux上 heroku local -f Procfile.bash
或 heroku -f Procfile.local
for windows,并转到 http:// localhost:3000 ,检查结果。
When I try to run
heroku local
my console shows me:
[WARN] No ENV file found
How can I fix this?
Cheers,
Add an .env
file. This files contains the local VARS
that are different in your local setting from the heroku environment. However, if everything runs fine, you can just ignore the warning, or do touch .env
.
You can also differentiate by creating a Procfile.local
file and run heroku local -f Procfile.local
, to force using a local start script.
I just read: https://devcenter.heroku.com/articles/heroku-local. That explains it all.
For a working example: http://github.com/halcwb/GenUnitApp.git. When you have the heroku toolbelt installed you can heroku local -f Procfile.bash
on mac or linux, or heroku -f Procfile.local
for windows, and go to http://localhost:3000, to check the result.
这篇关于Heroku本地[WARN]找不到ENV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!