在Windows上设置流星应用程序的ROOT_URL

Set ROOT_URL of meteor app on Windows

本文关键字:ROOT URL 应用程序 流星 Windows 设置      更新时间:2023-09-26

标题几乎说明了一切。你是怎么做到的?

我正在尝试设置帐户-facebook 包,但它不断传递本地主机以进行 OAUTH 握手。

在 *nix 环境中,它是这样完成的:

ROOT_URL="http://www.mydomain.com/" meteor run

但这在Windows上不起作用。

我无法为您测试它,但您会像 Windows 中的任何其他 ENV 变量一样设置它......

http://itechtalk.com/thread3595.html 应该有帮助

或者在命令行上:

set some_variable = some_value  

简单的两行版本:

set ROOT_URL=http://www.example.com:3000
meteor run

一行版本,如果你真的需要它:

cmd /c "set ROOT_URL=http://www.example.com:3000&& meteor run"

(请注意,URL 和 &&:该空格包含在 URL 中,这会破坏 meteor,因为它将在其 URL 中使用该空格。

来源:在 Windows cmd 中仅为一个命令设置环境变量.exe