使用解析云代码与解析服务器Heroku

问题描述 投票:0回答:1

我正在托管我的Parse Server Heroku。设置非常顺利,现在一切正常。我有Parse Cloud Code我需要设置我找到了一种方法来从StackOverFlow的answer做到这一点。我已将云代码上传到我的解析服务器github存储库,您检查了屏幕截图。但是当我将此存储库部署到Heroku时,我得到了应用程序错误。当我部署正常版本的Parse Server时,它工作正常。

Cloud Code Added to the Cloud directory of Parse Server

heroku parse-platform
1个回答
0
投票

您应该只在您的云代码目录中有main.js.确保index.js中的云变量正确链接到它。应该是这样的

cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js'

为了使这更容易,您应该安装Heroku命令行工具并使用从那里克隆您的项目

heroku git:clone -a project-name

然后尝试在该项目中添加您的云代码并推回Heroku

git push heroku master
© www.soinside.com 2019 - 2024. All rights reserved.