Skip to content

xhonker/sftp-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple SFTP/FTP sync deploy

Install

npm i @xhonker/deploy -D
OR
yarn add @xhonker/deploy -D

Usage

const deploy = require('@xhonker/deploy');
deploy
  .start({
    username: 'user',
    password: 'pwd',
    host: '127.0.0.1',
    port: 21,
    protocol: 'ftp',
    remotePath: '/tmp',
    sourcePath: process.cwd(),
    passive: false, // active mode
  })
  .then(() => console.log('complete'))
  .cache((_) => console.error('fail'));

EntryOptions

Key Type Default Description
username string - username
password string - pwd
host string 127.0.0.1 remote host
port number 21 remote port
protocol "ftp"| "sftp" ftp protocol
remotePath string os.tmpdir() remote upload path
sourcePath string process.cwd() source path
passive boolean true ftp passive mode

Releases

No releases published

Packages

No packages published