本地开发

This commit is contained in:
2023-11-16 10:52:39 +08:00
parent 75000d846b
commit 9a57e4aaab
18 changed files with 700 additions and 484 deletions

View 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)
}
})