已部署应用程序中的 Meteor 设置 [英] Meteor Settings in a Deployed App

查看:23
本文介绍了已部署应用程序中的 Meteor 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个非常基本的问题,但这是我第一次使用 Meteor + Heroku,在部署 Meteor 应用程序(当前使用 heroku)后,我似乎无法弄清楚如何使用 settings.json 文件.

This is probably a very basic question, but this is my first time using Meteor + Heroku and I can't seem to figure out how to use the settings.json file after deploying a Meteor app (currently using heroku).

从我在网络上的研究时间来看,似乎为了在已部署的应用程序中使用设置,我必须做...

From my hours of research on web, it seems that in order to use the settings in a deployed app, I have to do...

export METEOR_SETTINGS="$(cat settings.json)"

起初我以为这是为了去一个boostrap文件......然后我意识到我错了,当我开始得到保留字错误(因为导出")

At first I thought that this is meant to go to a boostrap file... Then I realized I was wrong when I started get reserved word errors (because of "export")

那么...我在哪里以及如何使用这条线?我想使用终端输入这个吗?如果是这样,我如何在 Heroku 中做到这一点?

So... Where and how do I use this line? Am I suppose to use terminal to type this in? If so, how can I do that in Heroku?

推荐答案

基本上:heroku config:add METEOR_SETTINGS="$(cat settings.json)".

这篇关于已部署应用程序中的 Meteor 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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