Heroku本地[WARN]找不到ENV文件

编程入门 行业动态 更新时间:2024-10-24 10:26:17
本文介绍了Heroku本地[WARN]找不到ENV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我尝试运行时

heroku本地

我的控制台显示我:

[WARN]没有找到ENV文件

我该如何解决这个问题?

干杯,

解决方案

添加 .env 文件。这些文件包含本地设置与heroku环境不同的本地 VARS 。但是,如果一切运行良好,您可以忽略该警告,或执行 touch .env 。

您可以也可以通过创建 Procfile.local 文件并运行 heroku local -f Procfile.local 来区分,以强制使用本地启动脚本。

我刚刚阅读: https:// devcenter。 heroku/articles/heroku-local 。这解释了一切。

对于一个工作示例: http:// github的 / 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: devcenter.heroku/articles/heroku-local. That explains it all.

For a working example: github/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 localhost:3000, to check the result.

更多推荐

Heroku本地[WARN]找不到ENV文件

本文发布于:2023-10-28 13:29:30,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   文件   Heroku   WARN   ENV

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!