-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.js
34 lines (30 loc) · 813 Bytes
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @file 远程部署
* @author zhouqing02
*/
var sftp = require('node-sftp-deploy-i');
var chalk = require('chalk');
var config = {
test: {
host: '10.40.11.21',
port: '22',
username: 'root',
password: 'PkKgX8bA',
sourcePath: './fis-dist',
remotePath: '/data/app/7din/wechat/7din'
},
production: {
host: '10.40.11.21',
port: '22',
username: 'root',
password: 'PkKgX8bA',
sourcePath: './fis-dist',
remotePath: '/data/app/online/srcfile/sevend/wechat-baodan/htdocs/wechat/7din'
}
}
console.log(chalk.yellow(' ------- deploy start... ------- \n'));
sftp(config[process.env.NODE_ENV], function() {
console.log(chalk.cyan(' deploy complete.\n'));
}, function(err) {
console.log(err)
});