10步教你部署灵动云商到LeanCloud[图解]
2017-06-12 本文已影响0人
黄秀杰
首先创建一个LeanCloud账号










常见问题
1、提示404错误
检查是不是没有将LeanCloud数据请求的域名添加小程序后台白名单,白名单设置教程参见:https://leancloud.cn/docs/weapp-domains.html
以下是我的白名单

2、后端如何部署
部署方式有2种,分别是git方式与lean-cli命令行方式,前者可以参见我之前的教程:https://my.oschina.net/huangxiujie/blog/817038,后者可以参见官方教程:https://leancloud.cn/docs/leanengine_quickstart.html#部署到云端
3、可以部署到自己的服务器吗
可以,但推荐直接使用LeanCloud提供的,不用关心https证书的问题,LC也是提供自己的二级域名直接用
4、LeanCloud免费吗
我一直是用免费版,起步阶段够用。
免费版会强制休眠,预算够就买商业版的,可以绑顶级域名,有提供开发环境与生产环境2种环境,只是一天30元有点小贵。就看开发成本与运维成本之间,自己作出衡量了。
5、怎么将appid/appsecret换成自己的
小程序端的密钥配置文件在app.js中;php后端的在application/config/hooks.php文件中
6、源码下载地址