本地开发
This commit is contained in:
20
hd-glasses-app/deployHD.js
Normal file
20
hd-glasses-app/deployHD.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const client = require('scp2');
|
||||
const ora = require('ora');
|
||||
const chalk = require('chalk');
|
||||
const spinner = ora(chalk.green('正在发布到服务器...'));
|
||||
spinner.start();
|
||||
|
||||
client.scp('./dist/', { // 本地打包文件的位置
|
||||
"host": '172.16.3.19', // IP地址
|
||||
"port": '22', // 服务器端口
|
||||
"username": 'root', // 用户名
|
||||
"password": 'Huawei@123', // 密码
|
||||
"path": '/home/workplace/im/hd-glasses-app' // 项目路径
|
||||
}, err =>{
|
||||
spinner.stop();
|
||||
if (!err) {
|
||||
console.log(chalk.green("服务器部署完毕。"))
|
||||
} else {
|
||||
console.log("err", err)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user