在Parse上测试Cloud Code的工作流程是什么?

CDM*_*CDM 11 javascript android node.js ios parse-platform

所以我正在开发beforeSave/afterSave/etc中的一些业务逻辑.使用Parse.com键入webhooks.作为一个Javacscript/Parse新手,我发现这个流程有点单调乏味,我想知道我是否正确接近它.

  • 在iOS方面,我发送了一个测试PFObject
  • 这将激活该类的beforeSave()函数
  • 我遇到了语法错误
  • 检查控制台日志/错误,直到我找到解决方案
  • 修复文本编辑器中的错误
  • 保存并运行'parse deploy'

重复广告恶心.

我可以使用Rest Console/Postman之类的东西来设置我的JSON请求吗?我可以在本地检查更多语法,而不是每次更改任意代码时都必须运行Parse Deploy吗?是否有任何改进的调试我可以使用像XCode/etc?

谢谢.

Ikm*_*ani 13

在Parse CLI中,有一个命令可以执行以下操作:

develop app
  Monitors for changes to source files and uploads updated files to Parse.
  This will also monitor the parse INFO log for any new log messages and write
  out updates to the terminal.  This requires an app to be provided, to
  avoid running develop on production apps accidently.
Run Code Online (Sandbox Code Playgroud)

运行parse develop MyApp您解析云代码根文件夹内(在您执行parse deploy).

完成后,终端将是交互式的 - 对源代码所做的任何更改都将自动更新.我创建了一个MyApp副本来区分生产/开发,所以我不小心推送代码.

然后我使用Postman,检查我的回答如下: 我的样品申请

p/s:x-www-form-urlencoded在Postman上使用参数请求.