【发布时间】:2016-02-16 10:02:15
【问题描述】:
我正在关注这些教程: http://rogerstringer.com/2016/02/04/parse-server-heroku/ https://devcenter.heroku.com/articles/deploying-a-parse-server-to-heroku
我正在尝试将 ParseServer 部署到 Heroku 并将我的应用程序与它连接。 部署部分进展顺利,我可以看到这个: '我梦想成为一个网站。'
我不知道把clientId和appId放在哪里。 这些是我在 Heroku 部分的配置变量:
这是我在 github 上的 ParseServer 中的代码:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'reciparia',
masterKey: process.env.MASTER_KEY || '' //Add your master key here. Keep it secret!
});
以及 AppDelegate 中的代码:
let parseConfiguration = ParseClientConfiguration(block: { (ParseMutableClientConfiguration) -> Void in
ParseMutableClientConfiguration.applicationId = "reciparia"
ParseMutableClientConfiguration.clientKey = "CLIENT_KEY"
ParseMutableClientConfiguration.server = "https://amazing-parse.herokuapp.com/parse"
})
由于ParseClientConfiguration 上必须有一个 clientKey,我应该在 ParseServer 上有一个。
我应该把它放在哪里?在 Heroku UI 的 Config Vars 或 ParseServer 的 index.js 上?
【问题讨论】:
标签: swift heroku parse-server