ftp-cli
v1.0.4
Published
ftp cli tool
Downloads
10
Readme
FTP CLI
install
npm i -g ftp-cli
or
npm i ftp-cli --save-dev
config
create ftp.config.js at project root directory
ftp.config.js
[
{
"host":"localhost",
"port":21,
"user":"admin",
"password":"admin",
"srcPath":"src",
"destPath":"/admin"
},
...
]
detail info about ftp,please look up node-ftp
Usage
ftp-cli:equal ftp-cli 0
ftp-cli 0:use ftp.config.js first option
ftp-cli --all:show all ftp server in ftp.config.js
ftp-cli --help:show help for usage
code
const Upload = require('ftp-cli');
const uploaderInstance = new Upload(server);
uploaderInstance.put(
server.srcPath,
server.destPath
);