ftp-promise-client
v0.1.1
Published
just using node-ftp but with promise
Downloads
3
Readme
ftp-promise-client
still developing, promise ftp client base on ftp
Installation
$ yarn add ftp-promise-client
How To Use
var fs = require('fs')
var path = require('path')
var FtpClientPromise = require('ftp-promise-client')
var rawPath = './app.json'
var configPath = path.join(__dirname, rawPath)
if (!fs.existsSync(configPath)) {
throw new Error('app.json Config is not exist')
}
let appConfig = require(rawPath)
var ftpClient = FtpClientPromise.Factory(appConfig.ftp)
ftpClient.list().then(function (result) {
console.log(result.response)
ftpClient.close()
})