sftp-file-watcher

1.0.3 • Public • Published

#Sftp file watcher

SFTP file watcher monitors the SFTP directory provided and tigger corresponding event. It's easy to start and stop process at any time.

Configuration

  • install package

      npm install sftp-file-watcher
    

SampleCode

var listener = require('./watcher');

var sftpConfig = {
    host: "127.0.0.1",
    port: 22,
    username: "user_name",
    password: "password",
};

var listener = new watcher(sftpConfig, "path-to-folder/");

/** triggers on the start of listening */
listener.on("init", function (data) {
    console.log(data);
});

/** listen to every file upload */
listener.on("upload", function (data) {
    console.log(data);
});

note: more functionalities are coming soon !!!

Readme

Keywords

Package Sidebar

Install

npm i sftp-file-watcher

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.74 kB

Total Files

3

Last publish

Collaborators

  • devnikhilmohan