sftp-file-watcher
v1.0.3
Published
An sftp file watcher
Downloads
15
Readme
#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 !!!