1.0.3 • Published 1 year ago

sftp-file-watcher v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

#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 !!!

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago