使用 "meteor_runtime_config.ROOT_URL" 这将返回 ROOT_URL 环境变量。 这是检测环境的最简单方法。 您可以在 .bash_profile 或 .profile 中设置此值。 export ROOT_URL=http://YOURDOMAIN.com