在安装npm的情况下执行 1
| cordova plugin add cordova-hot-code-push-plugin
|
然后 在项目根目录 建立 cordova-hcp.json内容如下
1
2
3
4
| {
"update": "now",
"content_url": "http://w15.9026.com/"
}
|
其中 content_url 为服务器地址
然后执行
然后在config.xml末尾widget里面添加
1
2
3
| <chcp>
<config-file url="http://w15.9026.com/chcp.json"/>
</chcp>
|
然后把代码提交到服务器即可
|