1.0.0 • Published 3 years ago
auto-deployment-web v1.0.0
sftp ,七牛云 前端自动部署工具
代码示例
const autoDeployment = require("../index"); const path = require("path");
/**
- 七牛云示例
- */ const qiniu= autoDeployment.qiniu({ accessKey:'accessKey', secretKey:'secretKey-Y1bYhER4iKjNp', bucketName:'bucketName', });
qiniu.upload({ uploadFilePath:path.resolve(__dirname, './target/debug/'), });
/**
- sftp 示例
- */ const sftp= autoDeployment.sftp({ host:'192.168.1.1', username:'root', password:'password', });
/**
- 服务器部署后 地址即是:
- /root/www/projectName/xxx
- */ sftp.upload({ romotePath:'/root/www/', uploadFilePath:path.resolve(__dirname, './target/debug/'), })
1.0.0
3 years ago