Heroku本地[WARN]找不到ENV文件 [英] Heroku Local [WARN] No ENV file found

查看:283
本文介绍了Heroku本地[WARN]找不到ENV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行时

  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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆