A library which allows listening for file creation, copying and downoading from the Azure File Share
npm install azure-fileshare-utilA library for interfacing with Azure File Share
- listening to changes and make callbacks with identified changes
- backing up files
- downloading files
- uploading files
By listening to Azure File Share changes it is possible to kick off processing pipelines as end users dump files into a file share.
Gets dependencies
```
npm install
For each change identified the callback receives an entity of the following form
``
{
name:
action:
}
- Define your callback to handle the change ...which is an entity with keys 'name' and 'action
- Define your config which references Azure
- Instantiate the listener with the config
- Request to listen with changes delivered to your callback
``
let mycallback =(change)=>{
let { name, action} = change
...handle change to file
}
let config = {
POLL_FREQUENCY: 10000,
account:
accountKey:
shareName:
directoryName:
}
let listener = Listener(config)
listener.listen(mycallback)
```
npm start
This will lint the source, run the tests
export DEBUG=listener,listener.test