```javascript new HttpPush({ receiver: 'http://127.0.0.1:7999/receiver', to: '/home/www', data: { t: +new Date() }, include: [ path.resolve(__dirname, '..', 'src'), path.resolve(__dirname, '..', 'public'),
npm install webpack-http-push#### 依托于 HTTP POST 远程部署代码至服务器
``javascript`
new HttpPush({
receiver: 'http://127.0.0.1:7999/receiver',
to: '/home/www',
data: {
t: +new Date()
},
include: [
path.resolve(__dirname, '..', 'src'),
path.resolve(__dirname, '..', 'public'),
/^\/dist\/assets\/*.js/i
],
exclude: []
})
#### push-server是服务端接收程序, 与http-push配合使用。
- 项目中内置 http-push-server, npm安装完毕后可去安装路径找出;npm i .
- 执行代码 进行安装;node index.js 7999
- 运行服务 or pm2 start index.js --name [PUSH-SERV] -- 7999;token` 验证, 以防止公网部署被滥用; (待开发)
- 可扩展
------
PS: 更多待完善, 稍晚些关联github issue;